/*

This file is part of Ext JS 4

Copyright (c) 2011 Sencha Inc

Contact:  http://www.sencha.com/contact

Commercial Usage
Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha.

If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.

*/
var Ext=Ext||{};(function(){var global=this,objectPrototype=Object.prototype,toString=objectPrototype.toString,enumerables=true,enumerablesTest={toString:1},emptyFn=function(){},i;if(typeof Ext==="undefined"){global.Ext={}}Ext.global=global;for(i in enumerablesTest){enumerables=null}if(enumerables){enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=enumerables;Ext.apply=function(object,config,defaults){if(defaults){Ext.apply(object,defaults)}if(object&&config&&typeof config==="object"){var i,j,k;for(i in config){object[i]=config[i]}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(config.hasOwnProperty(k)){object[k]=config[k]}}}}return object};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{name:Ext.sandboxName||"Ext",emptyFn:emptyFn,emptyString:new String(),baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(object,config){var property;if(object){for(property in config){if(object[property]===undefined){object[property]=config[property]}}}return object},iterate:function(object,fn,scope){if(Ext.isEmpty(object)){return}if(scope===undefined){scope=object}if(Ext.isIterable(object)){Ext.Array.each.call(Ext.Array,object,fn,scope)}else{Ext.Object.each.call(Ext.Object,object,fn,scope)}}});Ext.apply(Ext,{extend:function(){var objectConstructor=objectPrototype.constructor,inlineOverrides=function(o){for(var m in o){if(!o.hasOwnProperty(m)){continue}this[m]=o[m]}};return function(subclass,superclass,overrides){if(Ext.isObject(superclass)){overrides=superclass;superclass=subclass;subclass=overrides.constructor!==objectConstructor?overrides.constructor:function(){superclass.apply(this,arguments)}}var F=function(){},subclassProto,superclassProto=superclass.prototype;F.prototype=superclassProto;subclassProto=subclass.prototype=new F();subclassProto.constructor=subclass;subclass.superclass=superclassProto;if(superclassProto.constructor===objectConstructor){superclassProto.constructor=superclass}subclass.override=function(overrides){Ext.override(subclass,overrides)};subclassProto.override=inlineOverrides;subclassProto.proto=subclassProto;subclass.override(overrides);subclass.extend=function(o){return Ext.extend(subclass,o)};return subclass}}(),override:function(cls,overrides){if(cls.$isClass){return cls.override(overrides)}else{Ext.apply(cls.prototype,overrides)}}});Ext.apply(Ext,{valueFrom:function(value,defaultValue,allowBlank){return Ext.isEmpty(value,allowBlank)?defaultValue:value},typeOf:function(value){if(value===null){return"null"}var type=typeof value;if(type==="undefined"||type==="string"||type==="number"||type==="boolean"){return type}var typeToString=toString.call(value);switch(typeToString){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(type==="function"){return"function"}if(type==="object"){if(value.nodeType!==undefined){if(value.nodeType===3){return(/\S/).test(value.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(value,allowEmptyString){return(value===null)||(value===undefined)||(!allowEmptyString?value==="":false)||(Ext.isArray(value)&&value.length===0)},isArray:("isArray" in Array)?Array.isArray:function(value){return toString.call(value)==="[object Array]"},isDate:function(value){return toString.call(value)==="[object Date]"},isObject:(toString.call(null)==="[object Object]")?function(value){return value!==null&&value!==undefined&&toString.call(value)==="[object Object]"&&value.ownerDocument===undefined}:function(value){return toString.call(value)==="[object Object]"},isSimpleObject:function(value){return value instanceof Object&&value.constructor===Object},isPrimitive:function(value){var type=typeof value;return type==="string"||type==="number"||type==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(value){return toString.call(value)==="[object Function]"}:function(value){return typeof value==="function"},isNumber:function(value){return typeof value==="number"&&isFinite(value)},isNumeric:function(value){return !isNaN(parseFloat(value))&&isFinite(value)},isString:function(value){return typeof value==="string"},isBoolean:function(value){return typeof value==="boolean"},isElement:function(value){return value?value.nodeType===1:false},isTextNode:function(value){return value?value.nodeName==="#text":false},isDefined:function(value){return typeof value!=="undefined"},isIterable:function(value){var type=typeof value,checkLength=false;if(value&&type!="string"){if(type=="function"){if(Ext.isSafari){checkLength=value instanceof NodeList||value instanceof HTMLCollection}}else{checkLength=true}}return checkLength?value.length!==undefined:false}});Ext.apply(Ext,{clone:function(item){if(item===null||item===undefined){return item}if(item.nodeType&&item.cloneNode){return item.cloneNode(true)}var type=toString.call(item);if(type==="[object Date]"){return new Date(item.getTime())}var i,j,k,clone,key;if(type==="[object Array]"){i=item.length;clone=[];while(i--){clone[i]=Ext.clone(item[i])}}else{if(type==="[object Object]"&&item.constructor===Object){clone={};for(key in item){clone[key]=Ext.clone(item[key])}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];clone[k]=item[k]}}}}return clone||item},getUniqueGlobalNamespace:function(){var uniqueGlobalNamespace=this.uniqueGlobalNamespace;if(uniqueGlobalNamespace===undefined){var i=0;do{uniqueGlobalNamespace="ExtBox"+(++i)}while(Ext.global[uniqueGlobalNamespace]!==undefined);Ext.global[uniqueGlobalNamespace]=Ext;this.uniqueGlobalNamespace=uniqueGlobalNamespace}return uniqueGlobalNamespace},functionFactoryCache:{},cacheableFunctionFactory:function(){var me=this,args=Array.prototype.slice.call(arguments),cache=me.functionFactoryCache,idx,fn,ln;if(Ext.enableSandbox){ln=args.length;if(ln>0){ln--;args[ln]="var Ext=window."+Ext.name+";"+args[ln]}}idx=args.join("");fn=cache[idx];if(!fn){fn=Function.prototype.constructor.apply(Function.prototype,args);cache[idx]=fn}return fn},functionFactory:function(){var me=this,args=Array.prototype.slice.call(arguments),ln;if(Ext.enableSandbox){ln=args.length;if(ln>0){ln--;args[ln]="var Ext=window."+Ext.name+";"+args[ln]}}return Function.prototype.constructor.apply(Function.prototype,args)},globalEval:("execScript" in global)?function(code){global.execScript(code)}:function(code){(function(){eval(code)})()},Logger:{verbose:emptyFn,log:emptyFn,info:emptyFn,warn:emptyFn,error:function(message){throw new Error(message)},deprecate:emptyFn}});Ext.type=Ext.typeOf})();(function(){var a="4.1.0",b;Ext.Version=b=Ext.extend(Object,{constructor:function(c){var e,d;if(c instanceof b){return c}this.version=this.shortVersion=String(c).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");d=this.version.search(/([^\d\.])/);if(d!==-1){this.release=this.version.substr(d,c.length);this.shortVersion=this.version.substr(0,d)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");e=this.version.split(".");this.major=parseInt(e.shift()||0,10);this.minor=parseInt(e.shift()||0,10);this.patch=parseInt(e.shift()||0,10);this.build=parseInt(e.shift()||0,10);return this},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(h,g){var d,e,c;h=new b(h).toArray();g=new b(g).toArray();for(c=0;c<Math.max(h.length,g.length);c++){d=this.getComponentValue(h[c]);e=this.getComponentValue(g[c]);if(d<e){return -1}else{if(d>e){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,g,d){if(b.compare(Ext.getVersion(c),e)<1){g.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,basicTrimRe:/^\s+|\s+$/g,whitespaceRe:/\s+/,htmlEncode:(function(){var d={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;"},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(h,g){return d[g]})}})(),htmlDecode:(function(){var d={"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(h,g){if(g in d){return d[g]}else{return String.fromCharCode(parseInt(g.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.length<c){a=d+a}return a},format:function(b){var a=Ext.Array.toArray(arguments,1);return b.replace(Ext.String.formatRe,function(c,d){return a[d]})},repeat:function(e,d,b){for(var a=[],c=d;c--;){a.push(e)}return a.join(b||"")},splitWords:function(a){if(a&&typeof a=="string"){return a.replace(Ext.String.basicTrimRe,"").split(Ext.String.whitespaceRe)}return a||[]}};Ext.htmlEncode=Ext.String.htmlEncode;Ext.htmlDecode=Ext.String.htmlDecode;Ext.urlAppend=Ext.String.urlAppend;(function(){var a=(0.9).toFixed()!=="1";Ext.Number={constrain:function(d,c,b){d=parseFloat(d);if(!isNaN(c)){d=Math.max(d,c)}if(!isNaN(b)){d=Math.min(d,b)}return d},snap:function(e,c,d,h){var g=e,b;if(!(c&&e)){return e}b=e%c;if(b!==0){g-=b;if(b*2>=c){g+=c}else{if(b*2<-c){g-=c}}}return Ext.Number.constrain(g,d,h)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b},randomInt:function(c,b){return Math.floor(Math.random()*(b-c+1)+c)}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var g=Array.prototype,o=g.slice,q=function(){var A=[],e,z=20;if(!A.splice){return false}while(z--){A.push("A")}A.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=A.length;A.splice(13,0,"XXX");if(e+1!=A.length){return false}return true}(),j="forEach" in g,u="map" in g,p="indexOf" in g,y="every" in g,c="some" in g,d="filter" in g,n=function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}(),k=true,a;try{if(typeof document!=="undefined"){o.call(document.getElementsByTagName("body"))}}catch(s){k=false}function m(z,e){return(e<0)?Math.max(0,z.length+e):Math.min(z.length,e)}function x(G,F,z,J){var K=J?J.length:0,B=G.length,H=m(G,F);if(H===B){if(K){G.push.apply(G,J)}}else{var E=Math.min(z,B-H),I=H+E,A=I+K-E,e=B-I,C=B-E,D;if(A<I){for(D=0;D<e;++D){G[A+D]=G[I+D]}}else{if(A>I){for(D=e;D--;){G[A+D]=G[I+D]}}}if(K&&H===C){G.length=C;G.push.apply(G,J)}else{G.length=C+K;for(D=0;D<K;++D){G[H+D]=J[D]}}}return G}function i(B,e,A,z){if(z&&z.length){if(e<B.length){B.splice.apply(B,[e,A].concat(z))}else{B.push.apply(B,z)}}else{B.splice(e,A)}return B}function b(A,e,z){return x(A,e,z)}function r(A,e,z){A.splice(e,z);return A}function l(C,e,A){var B=m(C,e),z=C.slice(e,m(C,B+A));if(arguments.length<4){x(C,B,A)}else{x(C,B,A,o.call(arguments,3))}return z}function h(e){return e.splice.apply(e,o.call(arguments,1))}var w=q?r:b,t=q?i:x,v=q?h:l;a=Ext.Array={each:function(D,B,A,e){D=a.from(D);var z,C=D.length;if(e!==true){for(z=0;z<C;z++){if(B.call(A||D[z],D[z],z,D)===false){return z}}}else{for(z=C-1;z>-1;z--){if(B.call(A||D[z],D[z],z,D)===false){return z}}}return true},forEach:function(C,A,z){if(j){return C.forEach(A,z)}var e=0,B=C.length;for(;e<B;e++){A.call(z,C[e],e,C)}},indexOf:function(C,A,B){if(p){return C.indexOf(A,B)}var e,z=C.length;for(e=(B<0)?Math.max(0,z+B):B||0;e<z;e++){if(C[e]===A){return e}}return -1},contains:function(B,A){if(p){return B.indexOf(A)!==-1}var e,z;for(e=0,z=B.length;e<z;e++){if(B[e]===A){return true}}return false},toArray:function(A,C,e){if(!A||!A.length){return[]}if(typeof A==="string"){A=A.split("")}if(k){return o.call(A,C||0,e||A.length)}var B=[],z;C=C||0;e=e?((e<0)?A.length+e:e):A.length;for(z=C;z<e;z++){B.push(A[z])}return B},pluck:function(D,e){var z=[],A,C,B;for(A=0,C=D.length;A<C;A++){B=D[A];z.push(B[e])}return z},map:function(D,C,B){if(u){return D.map(C,B)}var A=[],z=0,e=D.length;for(;z<e;z++){A[z]=C.call(B,D[z],z,D)}return A},every:function(C,A,z){if(y){return C.every(A,z)}var e=0,B=C.length;for(;e<B;++e){if(!A.call(z,C[e],e,C)){return false}}return true},some:function(C,A,z){if(c){return C.some(A,z)}var e=0,B=C.length;for(;e<B;++e){if(A.call(z,C[e],e,C)){return true}}return false},clean:function(C){var z=[],e=0,B=C.length,A;for(;e<B;e++){A=C[e];if(!Ext.isEmpty(A)){z.push(A)}}return z},unique:function(C){var B=[],e=0,A=C.length,z;for(;e<A;e++){z=C[e];if(a.indexOf(B,z)===-1){B.push(z)}}return B},filter:function(D,B,A){if(d){return D.filter(B,A)}var z=[],e=0,C=D.length;for(;e<C;e++){if(B.call(A,D[e],e,D)){z.push(D[e])}}return z},from:function(z,e){if(z===undefined||z===null){return[]}if(Ext.isArray(z)){return(e)?o.call(z):z}if(z&&z.length!==undefined&&typeof z!=="string"){return a.toArray(z)}return[z]},remove:function(A,z){var e=a.indexOf(A,z);if(e!==-1){w(A,e,1)}return A},include:function(z,e){if(!a.contains(z,e)){z.push(e)}},clone:function(e){return o.call(e)},merge:function(){var e=o.call(arguments),B=[],z,A;for(z=0,A=e.length;z<A;z++){B=B.concat(e[z])}return a.unique(B)},intersect:function(){var A=[],e=o.call(arguments),E,C,B,G,H,K,J,I,z,D;if(!e.length){return A}for(E=K=0,I=e.length;E<I,H=e[E];E++){if(!G||H.length<G.length){G=H;K=E}}G=a.unique(G);w(e,K,1);for(E=0,I=G.length;E<I,K=G[E];E++){var F=0;for(C=0,z=e.length;C<z,H=e[C];C++){for(B=0,D=H.length;B<D,J=H[B];B++){if(K===J){F++;break}}}if(F===z){A.push(K)}}return A},difference:function(z,e){var E=o.call(z),C=E.length,B,A,D;for(B=0,D=e.length;B<D;B++){for(A=0;A<C;A++){if(E[A]===e[B]){w(E,A,1);A--;C--}}}return E},slice:([1,2].slice(1,undefined).length?function(A,z,e){return o.call(A,z,e)}:function(A,z,e){if(typeof z==="undefined"){return o.call(A)}if(typeof e==="undefined"){return o.call(A,z)}return o.call(A,z,e)}),sort:function(F,E){if(n){if(E){return F.sort(E)}else{return F.sort()}}var C=F.length,B=0,D,e,A,z;for(;B<C;B++){A=B;for(e=B+1;e<C;e++){if(E){D=E(F[e],F[A]);if(D<0){A=e}}else{if(F[e]<F[A]){A=e}}}if(A!==B){z=F[B];F[B]=F[A];F[A]=z}}return F},flatten:function(A){var z=[];function e(B){var D,E,C;for(D=0,E=B.length;D<E;D++){C=B[D];if(Ext.isArray(C)){e(C)}else{z.push(C)}}return z}return e(A)},min:function(D,C){var z=D[0],e,B,A;for(e=0,B=D.length;e<B;e++){A=D[e];if(C){if(C(z,A)===1){z=A}}else{if(A<z){z=A}}}return z},max:function(D,C){var e=D[0],z,B,A;for(z=0,B=D.length;z<B;z++){A=D[z];if(C){if(C(e,A)===-1){e=A}}else{if(A>e){e=A}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(C){var z=0,e,B,A;for(e=0,B=C.length;e<B;e++){A=C[e];z+=A}return z},toMap:function(C,e,A){var B={},z=C.length;if(!e){while(z--){B[C[z]]=z+1}}else{if(typeof e=="string"){while(z--){B[C[z][e]]=z+1}}else{while(z--){B[e.call(A,C[z])]=z+1}}}return B},erase:w,insert:function(A,z,e){return t(A,z,0,e)},replace:t,splice:v};Ext.each=a.each;a.union=a.merge;Ext.min=a.min;Ext.max=a.max;Ext.sum=a.sum;Ext.mean=a.mean;Ext.flatten=a.flatten;Ext.clean=a.clean;Ext.unique=a.unique;Ext.pluck=a.pluck;Ext.toArray=function(){return a.toArray.apply(a,arguments)}})();Ext.Function={flexSetter:function(a){return function(d,c){var e,g;if(d===null){return this}if(typeof d!=="string"){for(e in d){if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}if(Ext.enumerables){for(g=Ext.enumerables.length;g--;){e=Ext.enumerables[g];if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}}}else{a.call(this,d,c)}return this}},bind:function(d,c,b,a){if(arguments.length===2){return function(){return d.apply(c,arguments)}}var g=d,e=Array.prototype.slice;return function(){var h=b||arguments;if(a===true){h=e.call(arguments,0);h=h.concat(b)}else{if(typeof a=="number"){h=e.call(arguments,0);Ext.Array.insert(h,a,b)}}return g.apply(c||Ext.global,h)}},pass:function(c,a,b){if(!Ext.isArray(a)){if(typeof a=="string"){a=[a]}else{a=Ext.Array.clone(a)}}return function(){var d=[].concat(a);d.push.apply(d,arguments);return c.apply(b||this,d)}},alias:function(b,a){return function(){return b[a].apply(b,arguments)}},clone:function(a){return function(){return a.apply(this,arguments)}},createInterceptor:function(d,c,b,a){var e=d;if(!Ext.isFunction(c)){return d}else{return function(){var h=this,g=arguments;c.target=h;c.method=d;return(c.apply(b||h||Ext.global,g)!==false)?d.apply(h||Ext.global,g):a||null}}},createDelayed:function(e,c,d,b,a){if(d||b){e=Ext.Function.bind(e,d,b,a)}return function(){var h=this,g=Array.prototype.slice.call(arguments);setTimeout(function(){e.apply(h,g)},c)}},defer:function(e,c,d,b,a){e=Ext.Function.bind(e,d,b,a);if(c>0){return setTimeout(e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){var h=c||Array.prototype.slice.call(arguments,0),g=d||this;if(a){clearTimeout(a)}a=setTimeout(function(){e.apply(g,h)},b)}},createThrottled:function(e,b,d){var g,a,c,i,h=function(){e.apply(d||this,c);g=new Date().getTime()};return function(){a=new Date().getTime()-g;c=arguments;clearTimeout(i);if(!g||(a>=b)){h()}else{i=setTimeout(h,b-a)}}},interceptBefore:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){var g=d.apply(c||this,arguments);e.apply(this,arguments);return g})},interceptAfter:function(b,a,d,c){var e=b[a]||Ext.emptyFn;return(b[a]=function(){e.apply(this,arguments);return d.apply(c||this,arguments)})}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");(function(){var a=function(){};var b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,k,d){var c=b.toQueryObjects,j=[],g,h;if(Ext.isArray(k)){for(g=0,h=k.length;g<h;g++){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}else{if(Ext.isObject(k)){for(g in k){if(k.hasOwnProperty(g)){if(d){j=j.concat(c(e+"["+g+"]",k[g],true))}else{j.push({name:e,value:k[g]})}}}}else{j.push({name:e,value:k})}}return j},toQueryString:function(g,d){var h=[],e=[],l,k,m,c,n;for(l in g){if(g.hasOwnProperty(l)){h=h.concat(b.toQueryObjects(l,g[l],d))}}for(k=0,m=h.length;k<m;k++){c=h[k];n=c.value;if(Ext.isEmpty(n)){n=""}else{if(Ext.isDate(n)){n=Ext.Date.toString(n)}}e.push(encodeURIComponent(c.name)+"="+encodeURIComponent(String(n)))}return e.join("&")},fromQueryString:function(d,r){var m=d.replace(/^\?/,"").split("&"),u={},s,k,w,n,q,g,o,p,c,h,t,l,v,e;for(q=0,g=m.length;q<g;q++){o=m[q];if(o.length>0){k=o.split("=");w=decodeURIComponent(k[0]);n=(k[1]!==undefined)?decodeURIComponent(k[1]):"";if(!r){if(u.hasOwnProperty(w)){if(!Ext.isArray(u[w])){u[w]=[u[w]]}u[w].push(n)}else{u[w]=n}}else{h=w.match(/(\[):?([^\]]*)\]/g);t=w.match(/^([^\[]+)/);w=t[0];l=[];if(h===null){u[w]=n;continue}for(p=0,c=h.length;p<c;p++){v=h[p];v=(v.length===2)?"":v.substring(1,v.length-1);l.push(v)}l.unshift(w);s=u;for(p=0,c=l.length;p<c;p++){v=l[p];if(p===c-1){if(Ext.isArray(s)&&v===""){s.push(n)}else{s[v]=n}}else{if(s[v]===undefined||typeof s[v]==="string"){e=l[p+1];s[v]=(Ext.isNumeric(e)||e==="")?[]:{}}s=s[v]}}}}}return u},each:function(c,e,d){for(var g in c){if(c.hasOwnProperty(g)){if(e.call(d||c,g,c[g],c)===false){return}}}},merge:function(c){var j=1,k=arguments.length,d=b.merge,g=Ext.clone,h,m,l,e;for(;j<k;j++){h=arguments[j];for(m in h){l=h[m];if(l&&l.constructor===Object){e=c[m];if(e&&e.constructor===Object){d(e,l)}else{c[m]=g(l)}}else{c[m]=l}}}return c},mergeIf:function(k){var g=1,h=arguments.length,d=Ext.clone,c,e,j;for(;g<h;g++){c=arguments[g];for(e in c){if(!(e in k)){j=c[e];if(j&&j.constructor===Object){k[e]=d(j)}else{k[e]=j}}}}return k},getKey:function(c,e){for(var d in c){if(c.hasOwnProperty(d)&&c[d]===e){return d}}return null},getValues:function(d){var c=[],e;for(e in d){if(d.hasOwnProperty(e)){c.push(d[e])}}return c},getKeys:(typeof Object.keys=="function")?function(c){if(!c){return[]}return Object.keys(c)}:function(c){var d=[],e;for(e in c){if(c.hasOwnProperty(e)){d.push(e)}}return d},getSize:function(c){var d=0,e;for(e in c){if(c.hasOwnProperty(e)){d++}}return d},classify:function(g){var e=g,i=[],d={},c=function(){var k=0,l=i.length,m;for(;k<l;k++){m=i[k];this[m]=new d[m]}},h,j;for(h in g){if(g.hasOwnProperty(h)){j=g[h];if(j&&j.constructor===Object){i.push(h);d[h]=b.classify(j)}}}c.prototype=e;return c}};Ext.merge=Ext.Object.merge;Ext.mergeIf=Ext.Object.mergeIf;Ext.urlEncode=function(){var c=Ext.Array.from(arguments),d="";if((typeof c[1]==="string")){d=c[1]+"&";c[1]=false}return d+b.toQueryString.apply(b,c)};Ext.urlDecode=function(){return b.fromQueryString.apply(b,arguments)}})();(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Ext.Date={now:Date.now||function(){return +new Date()},toString:function(c){var d=Ext.String.leftPad;return c.getFullYear()+"-"+d(c.getMonth()+1,2,"0")+"-"+d(c.getDate(),2,"0")+"T"+d(c.getHours(),2,"0")+":"+d(c.getMinutes(),2,"0")+":"+d(c.getSeconds(),2,"0")},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return Ext.Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Ext.Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Ext.Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|MS)/;return function(e){return c.test(e.replace(d,""))}})(),formatContainsDateInfo:(function(){var d=/(\\.)/g,c=/([djzmnYycU]|MS)/;return function(e){return c.test(e.replace(d,""))}})(),formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g<d;++g){var j=k.charAt(g);h.push(j=="T"?"'T'":a.getFormatCode(j))}return h.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(o,c,n,k,g,j,e){k=k||0;g=g||0;j=j||0;e=e||0;var l=a.add(new Date(o<100?100:o,c-1,n,k,g,j,e),a.YEAR,o<100?o-100:0);return o==l.getFullYear()&&c==l.getMonth()+1&&n==l.getDate()&&k==l.getHours()&&g==l.getMinutes()&&j==l.getSeconds()&&e==l.getMilliseconds()},parse:function(d,g,c){var e=a.parseFunctions;if(e[g]==null){a.createParser(g)}return e[g](d,Ext.isDefined(c)?c:a.useStrict)},parseDate:function(d,e,c){return a.parse(d,e,c)},getFormatCode:function(d){var c=a.formatCodes[d];if(c){c=typeof c=="function"?c():c;a.formatCodes[d]=c}return c||("'"+Ext.String.escape(d)+"'")},createFormat:function(h){var g=[],c=false,e="";for(var d=0;d<h.length;++d){e=h.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;g.push("'"+Ext.String.escape(e)+"'")}else{g.push(a.getFormatCode(e))}}}a.formatFunctions[h]=Ext.functionFactory("return "+g.join("+"))},createParser:(function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Ext.Date.defaults,","results = String(input).match(Ext.Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = Ext.Date.clearTime(new Date);","y = Ext.Number.from(y, Ext.Number.from(def.y, dt.getFullYear()));","m = Ext.Number.from(m, Ext.Number.from(def.m - 1, dt.getMonth()));","d = Ext.Number.from(d, Ext.Number.from(def.d, dt.getDate()));","h  = Ext.Number.from(h, Ext.Number.from(def.h, dt.getHours()));","i  = Ext.Number.from(i, Ext.Number.from(def.i, dt.getMinutes()));","s  = Ext.Number.from(s, Ext.Number.from(def.s, dt.getSeconds()));","ms = Ext.Number.from(ms, Ext.Number.from(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(o){var e=a.parseRegexes.length,p=1,g=[],n=[],l=false,d="",j=0,k=o.length,m=[],h;for(;j<k;++j){d=o.charAt(j);if(!l&&d=="\\"){l=true}else{if(l){l=false;n.push(Ext.String.escape(d))}else{h=a.formatCodeToRegex(d,p);p+=h.g;n.push(h.s);if(h.g&&h.c){if(h.calcAtEnd){m.push(h.c)}else{g.push(h.c)}}}}}g=g.concat(m);a.parseRegexes[e]=new RegExp("^"+n.join("")+"$","i");a.parseFunctions[o]=Ext.functionFactory("input","strict",b(c,e,g.join("")))}})(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|0[1-9])"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(3[0-1]|[1-2][0-9]|[1-9])"},D:function(){for(var c=[],d=0;d<7;c.push(a.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+a.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Ext.Date.getMonthNumber(results[{0}]), 10);\n",s:"("+a.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(a.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|0[1-9])"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(1[0-2]|[1-9])"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a.formatCodeToRegex("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)",calcAtEnd:true},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)",calcAtEnd:true},g:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|[0-9])"},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|1[0-9]|[0-9])"},h:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(1[0-2]|0[1-9])"},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(2[0-3]|[0-1][0-9])"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"([0-5][0-9])"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g<d;++g){e.push(c[g].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},dateFormat:function(c,d){return a.format(c,d)},isEqual:function(d,c){if(d&&c){return(d.getTime()===c.getTime())}return !(d||c)},format:function(d,e){if(a.formatFunctions[e]==null){a.createFormat(e)}var c=a.formatFunctions[e].call(d);return c+""},getTimezone:function(c){return c.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(c,d){var e=c.getTimezoneOffset();return(e>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(g){var e=0,j=Ext.Date.clone(g),c=g.getMonth(),h;for(h=0,j.setDate(1),j.setMonth(0);h<c;j.setMonth(++h)){e+=a.getDaysInMonth(j)}return e+g.getDate()-1},getWeekOfYear:(function(){var c=86400000,d=7*c;return function(g){var h=Date.UTC(g.getFullYear(),g.getMonth(),g.getDate()+3)/c,e=Math.floor(h/7),i=new Date(e*d).getUTCFullYear();return e-Math.floor(Date.UTC(i,0,7)/d)+1}})(),isLeapYear:function(c){var d=c.getFullYear();return !!((d&3)==0&&(d%100||(d%400==0&&d)))},getFirstDayOfMonth:function(d){var c=(d.getDay()-(d.getDate()-1))%7;return(c<0)?(c+7):c},getLastDayOfMonth:function(c){return a.getLastDateOfMonth(c).getDay()},getFirstDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),1)},getLastDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),a.getDaysInMonth(c))},getDaysInMonth:(function(){var c=[31,28,31,30,31,30,31,31,30,31,30,31];return function(e){var d=e.getMonth();return d==1&&a.isLeapYear(e)?29:c[d]}})(),getSuffix:function(c){switch(c.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(c){return new Date(c.getTime())},isDST:function(c){return new Date(c.getFullYear(),0,1).getTimezoneOffset()!=c.getTimezoneOffset()},clearTime:function(e,j){if(j){return Ext.Date.clearTime(Ext.Date.clone(e))}var h=e.getDate();e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);if(e.getDate()!=h){for(var g=1,i=a.add(e,Ext.Date.HOUR,g);i.getDate()!=h;g++,i=a.add(e,Ext.Date.HOUR,g)){}e.setDate(h);e.setHours(i.getHours())}return e},add:function(h,g,i){var j=Ext.Date.clone(h),c=Ext.Date;if(!g||i===0){return j}switch(g.toLowerCase()){case Ext.Date.MILLI:j.setMilliseconds(j.getMilliseconds()+i);break;case Ext.Date.SECOND:j.setSeconds(j.getSeconds()+i);break;case Ext.Date.MINUTE:j.setMinutes(j.getMinutes()+i);break;case Ext.Date.HOUR:j.setHours(j.getHours()+i);break;case Ext.Date.DAY:j.setDate(j.getDate()+i);break;case Ext.Date.MONTH:var e=h.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(h),"mo",i)).getDate())}j.setDate(e);j.setMonth(h.getMonth()+i);break;case Ext.Date.YEAR:j.setFullYear(h.getFullYear()+i);break}return j},between:function(d,g,c){var e=d.getTime();return g.getTime()<=e&&e<=c.getTime()},compat:function(){var g=window.Date,e,c,h=["useStrict","formatCodeToRegex","parseFunctions","parseRegexes","formatFunctions","y2kYear","MILLI","SECOND","MINUTE","HOUR","DAY","MONTH","YEAR","defaults","dayNames","monthNames","monthNumbers","getShortMonthName","getShortDayName","getMonthNumber","formatCodes","isValid","parseDate","getFormatCode","createFormat","createParser","parseCodes"],d=["dateFormat","format","getTimezone","getGMTOffset","getDayOfYear","getWeekOfYear","isLeapYear","getFirstDayOfMonth","getLastDayOfMonth","getDaysInMonth","getSuffix","clone","isDST","clearTime","add","between"];Ext.Array.forEach(h,function(i){g[i]=a[i]});Ext.Array.forEach(d,function(i){g.prototype[i]=function(){var j=Array.prototype.slice.call(arguments);j.unshift(this);return a[i].apply(a,j)}})}};var a=Ext.Date})();(function(a){var d=[],b=function(){};function c(){var e=c.caller.caller;return e.$owner.prototype[e.$name].apply(this,arguments)}Ext.apply(b,{$className:"Ext.Base",$isClass:true,create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},extend:function(k){var e=k.prototype,n,h,j,l,g,m;h=this.prototype=Ext.Object.chain(e);h.self=this;this.superclass=h.superclass=e;if(!k.$isClass){n=Ext.Base.prototype;for(j in n){if(j in h){h[j]=n[j]}}}m=e.$inheritableStatics;if(m){for(j=0,l=m.length;j<l;j++){g=m[j];if(!this.hasOwnProperty(g)){this[g]=k[g]}}}if(k.$onExtended){this.$onExtended=k.$onExtended.slice()}h.config=new h.configClass;h.initConfigList=h.initConfigList.slice();h.initConfigMap=Ext.clone(h.initConfigMap);h.configMap=Ext.Object.chain(h.configMap)},"$onExtended":[],triggerExtended:function(){var h=this.$onExtended,g=h.length,e,j;if(g>0){for(e=0;e<g;e++){j=h[e];j.fn.apply(j.scope||this,arguments)}}},onExtended:function(g,e){this.$onExtended.push({fn:g,scope:e});return this},addConfig:function(i,m){var o=this.prototype,n=Ext.Class.configNameCache,j=o.configMap,k=o.initConfigList,h=o.initConfigMap,l=o.config,e,g,p;for(g in i){if(i.hasOwnProperty(g)){if(!j[g]){j[g]=true}p=i[g];e=n[g].initialized;if(!h[g]&&p!==null&&!o[e]){h[g]=true;k.push(g)}}}if(m){Ext.merge(l,i)}else{Ext.mergeIf(l,i)}o.configClass=Ext.Object.classify(l)},addStatics:function(e){var h,g;for(g in e){if(e.hasOwnProperty(g)){h=e[g];this[g]=h}}return this},addInheritableStatics:function(g){var j,e,i=this.prototype,h,k;j=i.$inheritableStatics;e=i.$hasInheritableStatics;if(!j){j=i.$inheritableStatics=[];e=i.$hasInheritableStatics={}}for(h in g){if(g.hasOwnProperty(h)){k=g[h];this[h]=k;if(!e[h]){e[h]=true;j.push(h)}}}return this},addMembers:function(g){var j=this.prototype,e=Ext.enumerables,m=[],k,l,h,n;for(h in g){m.push(h)}if(e){m.push.apply(m,e)}for(k=0,l=m.length;k<l;k++){h=m[k];if(g.hasOwnProperty(h)){n=g[h];if(typeof n=="function"&&!n.$isClass&&n!==Ext.emptyFn){n.$owner=this;n.$name=h}j[h]=n}}return this},addMember:function(e,g){if(typeof g=="function"&&!g.$isClass&&g!==Ext.emptyFn){g.$owner=this;g.$name=e}this.prototype[e]=g;return this},implement:function(){this.addMembers.apply(this,arguments)},borrow:function(k,h){var o=this.prototype,n=k.prototype,j,l,g,m,e;h=Ext.Array.from(h);for(j=0,l=h.length;j<l;j++){g=h[j];e=n[g];if(typeof e=="function"){m=function(){return e.apply(this,arguments)};m.$owner=this;m.$name=g;o[g]=m}else{o[g]=e}}return this},override:function(g){var n=this,p=Ext.enumerables,l=n.prototype,i=Ext.Function.clone,e,k,h,o,m,j;if(arguments.length===2){e=g;g={};g[e]=arguments[1];p=null}do{m=[];o=null;for(e in g){if(e=="statics"){o=g[e]}else{m.push(e)}}if(p){m.push.apply(m,p)}for(k=m.length;k--;){e=m[k];if(g.hasOwnProperty(e)){h=g[e];if(typeof h=="function"&&!h.$className&&h!==Ext.emptyFn){if(typeof h.$owner!="undefined"){h=i(h)}h.$owner=n;h.$name=e;j=l[e];if(j){h.$previous=j}}l[e]=h}}l=n;g=o}while(g);return this},callParent:function(e){var g;return(g=this.callParent.caller)&&(g.$previous||((g=g.$owner?g:g.caller)&&g.$owner.superclass.$class[g.$name])).apply(this,e||d)},mixin:function(h,j){var e=j.prototype,g=this.prototype,i;if(typeof e.onClassMixedIn!="undefined"){e.onClassMixedIn.call(j,this)}if(!g.hasOwnProperty("mixins")){if("mixins" in g){g.mixins=Ext.Object.chain(g.mixins)}else{g.mixins={}}}for(i in e){if(i==="mixins"){Ext.merge(g.mixins,e[i])}else{if(typeof g[i]=="undefined"&&i!="mixinId"&&i!="config"){g[i]=e[i]}}}if("config" in e){this.addConfig(e.config,false)}g.mixins[h]=e},getName:function(){return Ext.getClassName(this)},createAlias:a(function(g,e){this.override(g,function(){return this[e].apply(this,arguments)})}),addXtype:function(j){var g=this.prototype,i=g.xtypesMap,h=g.xtypes,e=g.xtypesChain;if(!g.hasOwnProperty("xtypesMap")){i=g.xtypesMap=Ext.merge({},g.xtypesMap||{});h=g.xtypes=g.xtypes?[].concat(g.xtypes):[];e=g.xtypesChain=g.xtypesChain?[].concat(g.xtypesChain):[];g.xtype=j}if(!i[j]){i[j]=true;h.push(j);e.push(j);Ext.ClassManager.setAlias(this,"widget."+j)}return this}});b.implement({isInstance:true,$className:"Ext.Base",configClass:Ext.emptyFn,initConfigList:[],configMap:{},initConfigMap:{},statics:function(){var g=this.statics.caller,e=this.self;if(!g){return e}return g.$owner},callParent:function(g){var h,e=(h=this.callParent.caller)&&(h.$previous||((h=h.$owner?h:h.caller)&&h.$owner.superclass[h.$name]));return e.apply(this,g||d)},self:b,constructor:function(){return this},hookMethod:function(g,i){var h=this,e=h.self;i.$owner=e;i.$name=g;if(h.hasOwnProperty(g)){i.$previous=h[g]}else{i.$previous=c}h[g]=i},hookMethods:function(e){Ext.Object.each(e,this.hookMethod,this)},initConfig:function(h){var n=h,m=Ext.Class.configNameCache,k=new this.configClass,q=this.initConfigList,j=this.configMap,p,l,o,g,e;this.initConfig=Ext.emptyFn;this.initialConfig=n||{};this.config=h=(n)?Ext.merge(k,h):k;if(n){q=q.slice();for(g in n){if(j[g]){if(n[g]!==null){q.push(g);this[m[g].initialized]=false}}}}for(l=0,o=q.length;l<o;l++){g=q[l];p=m[g];e=p.initialized;if(!this[e]){this[e]=true;this[p.set].call(this,h[g])}}return this},hasConfig:function(e){return Boolean(this.configMap[e])},setConfig:function(i,m){if(!i){return this}var h=Ext.Class.configNameCache,e=this.config,l=this.configMap,k=this.initialConfig,g,j;m=Boolean(m);for(g in i){if(m&&k.hasOwnProperty(g)){continue}j=i[g];e[g]=j;if(l[g]){this[h[g].set](j)}}return this},getConfig:function(g){var e=Ext.Class.configNameCache;return this[e[g].get]()},getInitialConfig:function(g){var e=this.config;if(!g){return e}else{return e[g]}},onConfigUpdate:function(l,n,o){var p=this.self,h,k,e,j,m,g;l=Ext.Array.from(l);o=o||this;for(h=0,k=l.length;h<k;h++){e=l[h];j="update"+Ext.String.capitalize(e);m=this[j]||Ext.emptyFn;g=function(){m.apply(this,arguments);o[n].apply(o,arguments)};g.$name=j;g.$owner=p;this[j]=g}},destroy:function(){this.destroy=Ext.emptyFn}});b.prototype.callOverridden=b.prototype.callParent;Ext.Base=b})(Ext.Function.flexSetter);(function(){var c,b=Ext.Base,g=[],e,d;for(e in b){if(b.hasOwnProperty(e)){g.push(e)}}d=g.length;function a(i){function h(){return this.constructor.apply(this,arguments)}return h}Ext.Class=c=function(i,j,h){if(typeof i!="function"){h=j;j=i;i=null}if(!j){j={}}i=c.create(i,j);c.process(i,j,h);return i};Ext.apply(c,{onBeforeCreated:function(i,j,h){i.addMembers(j);h.onCreated.call(i,i)},create:function(h,l){var j,k;if(!h){h=a()}for(k=0;k<d;k++){j=g[k];h[j]=b[j]}return h},process:function(h,q,m){var l=q.preprocessors||c.defaultPreprocessors,u=this.preprocessors,x={onBeforeCreated:this.onBeforeCreated},t=0,w=[],y,p,o,v,n,s,r,k;delete q.preprocessors;for(o=0,v=l.length;o<v;o++){y=l[o];if(typeof y=="string"){y=u[y];p=y.properties;if(p===true){w.push(y.fn)}else{if(p){for(n=0,s=p.length;n<s;n++){r=p[n];if(q.hasOwnProperty(r)){w.push(y.fn);break}}}}}else{w.push(y)}}x.onCreated=m?m:Ext.emptyFn;k=function(j,z,i){y=w[t++];if(!y){i.onBeforeCreated.apply(this,arguments);return}if(y.call(this,j,z,i,k)!==false){k.apply(this,arguments)}};k.call(this,h,q,x)},preprocessors:{},registerPreprocessor:function(i,l,j,h,k){if(!h){h="last"}if(!j){j=[i]}this.preprocessors[i]={name:i,properties:j||false,fn:l};this.setDefaultPreprocessorPosition(i,h,k);return this},getPreprocessor:function(h){return this.preprocessors[h]},getPreprocessors:function(){return this.preprocessors},defaultPreprocessors:[],getDefaultPreprocessors:function(){return this.defaultPreprocessors},setDefaultPreprocessors:function(h){this.defaultPreprocessors=Ext.Array.from(h);return this},setDefaultPreprocessorPosition:function(j,l,k){var h=this.defaultPreprocessors,i;if(typeof l=="string"){if(l==="first"){h.unshift(j);return this}else{if(l==="last"){h.push(j);return this}}l=(l==="after")?1:-1}i=Ext.Array.indexOf(h,k);if(i!==-1){Ext.Array.splice(h,Math.max(0,i+l),0,j)}return this},configNameCache:{},getConfigNameMap:function(j){var i=this.configNameCache,k=i[j],h;if(!k){h=j.charAt(0).toUpperCase()+j.substr(1);k=i[j]={internal:j,initialized:"_is"+h+"Initialized",apply:"apply"+h,update:"update"+h,set:"set"+h,get:"get"+h,doSet:"doSet"+h,changeEvent:j.toLowerCase()+"change"}}return k}});c.registerPreprocessor("extend",function(j,n){var m=Ext.Base,o=m.prototype,p=n.extend,l,h,k;delete n.extend;if(p&&p!==Object){l=p}else{l=m}h=l.prototype;if(!l.$isClass){for(k in o){if(!h[k]){h[k]=o[k]}}}j.extend(l);j.triggerExtended.apply(j,arguments);if(n.onClassExtended){j.onExtended(n.onClassExtended);delete n.onClassExtended}},true);c.registerPreprocessor("statics",function(h,i){h.addStatics(i.statics);delete i.statics});c.registerPreprocessor("inheritableStatics",function(h,i){h.addInheritableStatics(i.inheritableStatics);delete i.inheritableStatics});c.registerPreprocessor("config",function(h,k){var j=k.config,i=h.prototype;delete k.config;Ext.Object.each(j,function(n,w){var u=c.getConfigNameMap(n),q=u.internal,l=u.initialized,v=u.apply,o=u.update,t=u.set,m=u.get,y=(t in i)||k.hasOwnProperty(t),p=(v in i)||k.hasOwnProperty(v),r=(o in i)||k.hasOwnProperty(o),x,s;if(w===null||(!y&&!p&&!r)){i[q]=w;i[l]=true}else{i[l]=false}if(!y){k[t]=function(B){var A=this[q],z=this[v],C=this[o];if(!this[l]){this[l]=true}if(z){B=z.call(this,B,A)}if(typeof B!="undefined"){this[q]=B;if(C&&B!==A){C.call(this,B,A)}}return this}}if(!(m in i)||k.hasOwnProperty(m)){s=k[m]||false;if(s){x=function(){return s.apply(this,arguments)}}else{x=function(){return this[q]}}k[m]=function(){var z;if(!this[l]){this[l]=true;this[t](this.config[n])}z=this[m];if("$previous" in z){z.$previous=x}else{this[m]=x}return x.apply(this,arguments)}}});h.addConfig(j,true)});c.registerPreprocessor("mixins",function(l,p,h){var j=p.mixins,m,k,n,o;delete p.mixins;Ext.Function.interceptBefore(h,"onCreated",function(){if(j instanceof Array){for(n=0,o=j.length;n<o;n++){k=j[n];m=k.prototype.mixinId||k.$className;l.mixin(m,k)}}else{for(m in j){if(j.hasOwnProperty(m)){l.mixin(m,j[m])}}}})});Ext.extend=function(j,k,i){if(arguments.length===2&&Ext.isObject(k)){i=k;k=j;j=null}var h;if(!k){throw new Error("[Ext.extend] Attempting to extend from a class which has not been loaded on the page.")}i.extend=k;i.preprocessors=["extend","statics","inheritableStatics","mixins","config"];if(j){h=new c(j,i)}else{h=new c(i)}h.prototype.override=function(n){for(var l in n){if(n.hasOwnProperty(l)){this[l]=n[l]}}};return h}})();(function(b,d,g,c,e){var a=Ext.ClassManager={classes:{},existCache:{},namespaceRewrites:[{from:"Ext.",to:Ext}],maps:{alternateToName:{},aliasToName:{},nameToAliases:{},nameToAlternates:{},overridesByName:{}},enableNamespaceParseCache:true,namespaceParseCache:{},instantiators:[],isCreated:function(m){var l=this.existCache,k,n,j,h,o;if(this.classes[m]||l[m]){return true}h=e;o=this.parseNamespace(m);for(k=0,n=o.length;k<n;k++){j=o[k];if(typeof j!="string"){h=j}else{if(!h||!h[j]){return false}h=h[j]}}l[m]=true;this.triggerCreated(m);return true},createdListeners:[],nameCreatedListeners:{},triggerCreated:function(l){var k=this.createdListeners,j=this.nameCreatedListeners,h,m,n;for(h=0,m=k.length;h<m;h++){n=k[h];n.fn.call(n.scope,l)}k=j[l];if(k){for(h=0,m=k.length;h<m;h++){n=k[h];n.fn.call(n.scope,l)}delete j[l]}},onCreated:function(l,k,j){var i=this.createdListeners,h=this.nameCreatedListeners,m={fn:l,scope:k};if(j){if(this.isCreated(j)){l.call(k,j);return}if(!h[j]){h[j]=[]}h[j].push(m)}else{i.push(m)}},parseNamespace:function(k){var h=this.namespaceParseCache;if(this.enableNamespaceParseCache){if(h.hasOwnProperty(k)){return h[k]}}var l=[],n=this.namespaceRewrites,p=e,j=k,s,r,q,m,o;for(m=0,o=n.length;m<o;m++){s=n[m];r=s.from;q=s.to;if(j===r||j.substring(0,r.length)===r){j=j.substring(r.length);if(typeof q!="string"){p=q}else{l=l.concat(q.split("."))}break}}l.push(p);l=l.concat(j.split("."));if(this.enableNamespaceParseCache){h[k]=l}return l},setNamespace:function(l,o){var j=e,p=this.parseNamespace(l),n=p.length-1,h=p[n],m,k;for(m=0;m<n;m++){k=p[m];if(typeof k!="string"){j=k}else{if(!j[k]){j[k]={}}j=j[k]}}j[h]=o;return j[h]},createNamespaces:function(){var h=e,o,l,m,k,n,p;for(m=0,n=arguments.length;m<n;m++){o=this.parseNamespace(arguments[m]);for(k=0,p=o.length;k<p;k++){l=o[k];if(typeof l!="string"){h=l}else{if(!h[l]){h[l]={}}h=h[l]}}}return h},set:function(h,l){var k=this,n=k.maps,m=n.nameToAlternates,j=k.getName(l),i;k.classes[h]=k.setNamespace(h,l);if(j&&j!==h){n.alternateToName[h]=j;i=m[j]||(m[j]=[]);i.push(h)}return this},get:function(k){var m=this.classes;if(m[k]){return m[k]}var h=e,o=this.parseNamespace(k),j,l,n;for(l=0,n=o.length;l<n;l++){j=o[l];if(typeof j!="string"){h=j}else{if(!h||!h[j]){return null}h=h[j]}}return h},setAlias:function(h,i){var k=this.maps.aliasToName,l=this.maps.nameToAliases,j;if(typeof h=="string"){j=h}else{j=this.getName(h)}if(i&&k[i]!==j){k[i]=j}if(!l[j]){l[j]=[]}if(i){Ext.Array.include(l[j],i)}return this},getByAlias:function(h){return this.get(this.getNameByAlias(h))},getNameByAlias:function(h){return this.maps.aliasToName[h]||""},getNameByAlternate:function(h){return this.maps.alternateToName[h]||""},getAliasesByName:function(h){return this.maps.nameToAliases[h]||[]},getName:function(h){return h&&h.$className||""},getClass:function(h){return h&&h.self||null},applyOverrides:function(h){var n=this,l=n.maps.overridesByName,o=l[h],m=o&&o.length||0,k=n.createOverride,j;delete l[h];for(j=0;j<m;++j){k.apply(n,o[j])}},create:function(i,j,h){j.$className=i;return new b(j,function(){var n=j.postprocessors||a.defaultPostprocessors,u=a.postprocessors,r=0,v=[],t,k,o,s,m,q,p,w,l;delete j.postprocessors;for(o=0,s=n.length;o<s;o++){t=n[o];if(typeof t=="string"){t=u[t];p=t.properties;if(p===true){v.push(t.fn)}else{if(p){for(m=0,q=p.length;m<q;m++){w=p[m];if(j.hasOwnProperty(w)){v.push(t.fn);break}}}}}else{v.push(t)}}k=function(y,x,z){t=v[r++];if(!t){a.set(i,x);if(h){h.call(x,x)}a.triggerCreated(i);return}if(t.call(this,y,x,z,k)!==false){k.apply(this,arguments)}};k.call(a,i,this,j);a.applyOverrides(i);l=a.maps.nameToAlternates[i];for(o=0,s=l&&l.length||0;o<s;++o){a.applyOverrides(l[o])}})},createOverride:function(i,k,h){var n=this,m=k.override,p=n.get(m),l,j,o;if(p){l=Ext.apply({},k);delete l.requires;delete l.uses;delete l.override;n.create(i,{requires:k.requires,uses:k.uses,override:m},function(){this.active=true;if(p.override){p.override(l)}else{p.self.override(l)}if(h){h.call(p)}})}else{j=n.maps.overridesByName;o=j[m]||(j[m]=[]);o.push(Array.prototype.slice.call(arguments,0));n.setNamespace(i,{override:m})}},instantiateByAlias:function(){var i=arguments[0],h=g.call(arguments),j=this.getNameByAlias(i);if(!j){j=this.maps.aliasToName[i];Ext.syncRequire(j)}h[0]=j;return this.instantiate.apply(this,h)},instantiate:function(){var j=arguments[0],l=typeof j,i=g.call(arguments,1),k=j,m,h;if(l!="function"){if(l!="string"&&i.length===0){i=[j];j=j.xclass}h=this.get(j)}else{h=j}if(!h){m=this.getNameByAlias(j);if(m){j=m;h=this.get(j)}}if(!h){m=this.getNameByAlternate(j);if(m){j=m;h=this.get(j)}}if(!h){Ext.syncRequire(j);h=this.get(j)}return this.getInstantiator(i.length)(h,i)},dynInstantiate:function(i,h){h=c(h,true);h.unshift(i);return this.instantiate.apply(this,h)},getInstantiator:function(l){var k=this.instantiators,m;m=k[l];if(!m){var j=l,h=[];for(j=0;j<l;j++){h.push("a["+j+"]")}m=k[l]=new Function("c","a","return new c("+h.join(",")+")")}return m},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(i,l,j,h,k){if(!h){h="last"}if(!j){j=[i]}this.postprocessors[i]={name:i,properties:j||false,fn:l};this.setDefaultPostprocessorPosition(i,h,k);return this},setDefaultPostprocessors:function(h){this.defaultPostprocessors=c(h);return this},setDefaultPostprocessorPosition:function(i,l,k){var j=this.defaultPostprocessors,h;if(typeof l=="string"){if(l==="first"){j.unshift(i);return this}else{if(l==="last"){j.push(i);return this}}l=(l==="after")?1:-1}h=Ext.Array.indexOf(j,k);if(h!==-1){Ext.Array.splice(j,Math.max(0,h+l),0,i)}return this},getNamesByExpression:function(p){var n=this.maps.nameToAliases,q=[],h,m,k,j,r,l,o;if(p.indexOf("*")!==-1){p=p.replace(/\*/g,"(.*?)");r=new RegExp("^"+p+"$");for(h in n){if(n.hasOwnProperty(h)){k=n[h];if(h.search(r)!==-1){q.push(h)}else{for(l=0,o=k.length;l<o;l++){m=k[l];if(m.search(r)!==-1){q.push(h);break}}}}}}else{j=this.getNameByAlias(p);if(j){q.push(j)}else{j=this.getNameByAlternate(p);if(j){q.push(j)}else{q.push(p)}}}return q}};a.registerPostprocessor("alias",function(k,j,n){var h=n.alias,l,m;for(l=0,m=h.length;l<m;l++){d=h[l];this.setAlias(j,d)}},["xtype","alias"]);a.registerPostprocessor("singleton",function(i,h,k,j){j.call(this,i,new h(),k);return false});a.registerPostprocessor("alternateClassName",function(j,h,n){var l=n.alternateClassName,k,m,o;if(!(l instanceof Array)){l=[l]}for(k=0,m=l.length;k<m;k++){o=l[k];this.set(o,h)}});Ext.apply(Ext,{create:d(a,"instantiate"),widget:function(j,i){var n=j,k,l,h,m;if(typeof n!="string"){i=j;if(i.isComponent){return i}n=i.xtype}k="widget."+n;l=a.getNameByAlias(k);if(!l){m=true}h=a.get(l);if(m||!h){return a.instantiateByAlias(k,i||{})}return new h(i)},createByAlias:d(a,"instantiateByAlias"),define:function(i,j,h){if(j.override){return a.createOverride.apply(a,arguments)}return a.create.apply(a,arguments)},getClassName:d(a,"getName"),getDisplayName:function(h){if(h){if(h.displayName){return h.displayName}if(h.$name&&h.$class){return Ext.getClassName(h.$class)+"#"+h.$name}if(h.$className){return h.$className}}return"Anonymous"},getClass:d(a,"getClass"),namespace:d(a,"createNamespaces")});Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;b.registerPreprocessor("className",function(h,i){if(i.$className){h.$className=i.$className}},true,"first");b.registerPreprocessor("alias",function(t,n){var r=t.prototype,k=c(n.xtype),h=c(n.alias),u="widget.",s=u.length,o=Array.prototype.slice.call(r.xtypesChain||[]),l=Ext.merge({},r.xtypesMap||{}),m,q,p,j;for(m=0,q=h.length;m<q;m++){p=h[m];if(p.substring(0,s)===u){j=p.substring(s);Ext.Array.include(k,j)}}t.xtype=n.xtype=k[0];n.xtypes=k;for(m=0,q=k.length;m<q;m++){j=k[m];if(!l[j]){l[j]=true;o.push(j)}}n.xtypesChain=o;n.xtypesMap=l;Ext.Function.interceptAfter(n,"onClassCreated",function(){var i=r.mixins,w,v;for(w in i){if(i.hasOwnProperty(w)){v=i[w];k=v.xtypes;if(k){for(m=0,q=k.length;m<q;m++){j=k[m];if(!l[j]){l[j]=true;o.push(j)}}}}}});for(m=0,q=k.length;m<q;m++){j=k[m];Ext.Array.include(h,u+j)}n.alias=h},["xtype","alias"])})(Ext.Class,Ext.Function.alias,Array.prototype.slice,Ext.Array.from,Ext.global);(function(a,c,d,h,j,i,g,k){var e=["extend","mixins","requires"],b;b=Ext.Loader={isInHistory:{},history:[],config:{enabled:false,disableCaching:true,disableCachingParam:"_dc",paths:{Ext:"."}},setConfig:function(l,m){if(Ext.isObject(l)&&arguments.length===1){Ext.merge(this.config,l)}else{this.config[l]=(Ext.isObject(m))?Ext.merge(this.config[l],m):m}return this},getConfig:function(l){if(l){return this.config[l]}return this.config},setPath:d(function(l,m){this.config.paths[l]=m;return this}),getPath:function(l){var n="",o=this.config.paths,m=this.getPrefix(l);if(m.length>0){if(m===l){return o[m]}n=o[m];l=l.substring(m.length+1)}if(n.length>0){n+="/"}return n.replace(/\/\.\//g,"/")+l.replace(/\./g,"/")+".js"},getPrefix:function(m){var o=this.config.paths,n,l="";if(o.hasOwnProperty(m)){return m}for(n in o){if(o.hasOwnProperty(n)&&n+"."===m.substring(0,n.length+1)){if(n.length>l.length){l=n}}}return l},require:function(n,m,l,o){if(m){m.call(l)}},syncRequire:function(){},exclude:function(m){var l=this;return{require:function(p,o,n){return l.require(p,o,n,m)},syncRequire:function(p,o,n){return l.syncRequire(p,o,n,m)}}},onReady:function(o,n,p,l){var m;if(p!==false&&Ext.onDocumentReady){m=o;o=function(){Ext.onDocumentReady(m,n,l)}}o.call(n)}};Ext.apply(b,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isClassFileLoaded:{},isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},syncModeEnabled:false,scriptElements:{},refreshQueue:function(){var l=this.queue,r=l.length,o,q,m,p,n;if(r===0){this.triggerReady();return}for(o=0;o<r;o++){q=l[o];if(q){p=q.requires;n=q.references;if(p.length>this.numLoadedFiles){continue}m=0;do{if(a.isCreated(p[m])){g(p,m,1)}else{m++}}while(m<p.length);if(q.requires.length===0){g(l,o,1);q.callback.call(q.scope);this.refreshQueue();break}}}return this},injectScriptElement:function(n,p,r,o){var m=document.createElement("script"),q=this,l=function(){q.cleanupScriptElement(m);p.call(o)},s=function(){q.cleanupScriptElement(m);r.call(o)};m.type="text/javascript";m.src=n;m.onload=l;m.onerror=s;m.onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){l()}};this.documentHead.appendChild(m);return m},removeScriptElement:function(m){var l=this.scriptElements;if(l[m]){this.cleanupScriptElement(l[m],true);delete l[m]}return this},cleanupScriptElement:function(m,l){m.onload=null;m.onreadystatechange=null;m.onerror=null;if(l){this.documentHead.removeChild(m)}return this},loadScriptFile:function(m,t,q,x,l){var s=this,y=this.isFileLoaded,o=this.scriptElements,w=m+(this.getConfig("disableCaching")?("?"+this.getConfig("disableCachingParam")+"="+Ext.Date.now()):""),n=false,v,p,u;if(y[m]){return this}x=x||this;this.isLoading=true;if(!l){u=function(){};if(!Ext.isReady&&Ext.onDocumentReady){Ext.onDocumentReady(function(){if(!y[m]){o[m]=s.injectScriptElement(w,t,u,x)}})}else{o[m]=this.injectScriptElement(w,t,u,x)}}else{if(typeof XMLHttpRequest!="undefined"){v=new XMLHttpRequest()}else{v=new ActiveXObject("Microsoft.XMLHTTP")}try{v.open("GET",w,false);v.send(null)}catch(r){n=true}p=(v.status===1223)?204:v.status;if(!n){n=(p===0)}if(n){}else{if(p>=200&&p<300){Ext.globalEval(v.responseText+"\n//@ sourceURL="+m);t.call(x)}else{}}v=null}},syncRequire:function(){var l=this.syncModeEnabled;if(!l){this.syncModeEnabled=true}this.require.apply(this,arguments);if(!l){this.syncModeEnabled=false}this.refreshQueue()},require:function(G,u,o,r){var w={},n={},z=this.queue,D=this.classNameToFilePathMap,B=this.isClassFileLoaded,t=[],I=[],F=[],m=[],s,H,y,x,l,q,E,C,A,v,p;if(r){r=i(r);for(C=0,v=r.length;C<v;C++){l=r[C];if(typeof l=="string"&&l.length>0){t=a.getNamesByExpression(l);for(A=0,p=t.length;A<p;A++){w[t[A]]=true}}}}G=i(G);if(u){if(u.length>0){s=function(){var L=[],K,M,J;for(K=0,M=m.length;K<M;K++){J=m[K];L.push(a.get(J))}return u.apply(this,L)}}else{s=u}}else{s=Ext.emptyFn}o=o||Ext.global;for(C=0,v=G.length;C<v;C++){x=G[C];if(typeof x=="string"&&x.length>0){I=a.getNamesByExpression(x);p=I.length;for(A=0;A<p;A++){E=I[A];if(w[E]!==true){m.push(E);if(!a.isCreated(E)&&!n[E]){n[E]=true;F.push(E)}}}}}if(F.length>0){if(!this.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((F.length>1)?"es":"")+": "+F.join(", "))}}else{s.call(o);return this}H=this.syncModeEnabled;if(!H){z.push({requires:F.slice(),callback:s,scope:o})}v=F.length;for(C=0;C<v;C++){q=F[C];y=this.getPath(q);if(H&&B.hasOwnProperty(q)){this.numPendingFiles--;this.removeScriptElement(y);delete B[q]}if(!B.hasOwnProperty(q)){B[q]=false;D[q]=y;this.numPendingFiles++;this.loadScriptFile(y,j(this.onFileLoaded,[q,y],this),j(this.onFileLoadError,[q,y],this),this,H)}}if(H){s.call(o);if(v===1){return a.get(q)}}return this},onFileLoaded:function(m,l){this.numLoadedFiles++;this.isClassFileLoaded[m]=true;this.isFileLoaded[l]=true;this.numPendingFiles--;if(this.numPendingFiles===0){this.refreshQueue()}},onFileLoadError:function(n,m,l,o){this.numPendingFiles--;this.hasFileLoadError=true},addOptionalRequires:function(n){var p=this.optionalRequires,m,o,l;n=i(n);for(m=0,o=n.length;m<o;m++){l=n[m];k(p,l)}return this},triggerReady:function(m){var o=this.readyListeners,n=this.optionalRequires,l;if(this.isLoading||m){this.isLoading=false;if(n.length!==0){n=n.slice();this.optionalRequires.length=0;this.require(n,j(this.triggerReady,[true],this),this);return this}while(o.length){l=o.shift();l.fn.call(l.scope);if(this.isLoading){return this}}}return this},onReady:function(o,n,p,l){var m;if(p!==false&&Ext.onDocumentReady){m=o;o=function(){Ext.onDocumentReady(m,n,l)}}if(!this.isLoading){o.call(n)}else{this.readyListeners.push({fn:o,scope:n})}},historyPush:function(m){var l=this.isInHistory;if(m&&this.isClassFileLoaded.hasOwnProperty(m)&&!l[m]){l[m]=true;this.history.push(m)}return this}});Ext.disableCacheBuster=function(m,n){var l=new Date();l.setTime(l.getTime()+(m?10*365:-1)*24*60*60*1000);data=l.toGMTString();document.cookie="ext-cache=1; expires="+l+"; path="+(n||"/")};Ext.require=h(b,"require");Ext.syncRequire=h(b,"syncRequire");Ext.exclude=h(b,"exclude");Ext.onReady=function(n,m,l){b.onReady(n,m,true,l)};c.registerPreprocessor("loader",function(y,n,x,w){var u=this,s=[],t=a.getName(y),o,m,r,q,v,p,l;for(o=0,r=e.length;o<r;o++){p=e[o];if(n.hasOwnProperty(p)){l=n[p];if(typeof l=="string"){s.push(l)}else{if(l instanceof Array){for(m=0,q=l.length;m<q;m++){v=l[m];if(typeof v=="string"){s.push(v)}}}else{if(typeof l!="function"){for(m in l){if(l.hasOwnProperty(m)){v=l[m];if(typeof v=="string"){s.push(v)}}}}}}}}if(s.length===0){return}b.require(s,function(){for(o=0,r=e.length;o<r;o++){p=e[o];if(n.hasOwnProperty(p)){l=n[p];if(typeof l=="string"){n[p]=a.get(l)}else{if(l instanceof Array){for(m=0,q=l.length;m<q;m++){v=l[m];if(typeof v=="string"){n[p][m]=a.get(v)}}}else{if(typeof l!="function"){for(var z in l){if(l.hasOwnProperty(z)){v=l[z];if(typeof v=="string"){n[p][z]=a.get(v)}}}}}}}}w.call(u,y,n,x)});return false},true,"after","className");a.registerPostprocessor("uses",function(o,m,s){var l=i(s.uses),n=[],p,r,q;for(p=0,r=l.length;p<r;p++){q=l[p];if(typeof q=="string"){n.push(q)}}b.addOptionalRequires(n)});a.onCreated(function(l){this.historyPush(l)},b)})(Ext.ClassManager,Ext.Class,Ext.Function.flexSetter,Ext.Function.alias,Ext.Function.pass,Ext.Array.from,Ext.Array.erase,Ext.Array.include);Ext.Error=Ext.extend(Error,{statics:{ignore:false,raise:function(a){a=a||{};if(Ext.isString(a)){a={msg:a}}var c=this.raise.caller;if(c){if(c.$name){a.sourceMethod=c.$name}if(c.$owner){a.sourceClass=c.$owner.$className}}if(Ext.Error.handle(a)!==true){var b=Ext.Error.prototype.toString.call(a);Ext.log({msg:b,level:"error",dump:a,stack:true});throw new Ext.Error(a)}},handle:function(){return Ext.Error.ignore}},name:"Ext.Error",constructor:function(a){if(Ext.isString(a)){a={msg:a}}var b=this;Ext.apply(b,a);b.message=b.message||b.msg},toString:function(){var c=this,b=c.className?c.className:"",a=c.methodName?"."+c.methodName+"(): ":"",d=c.msg||"(No description provided)";return b+a+d}});Ext.deprecated=function(a){return Ext.emptyFn};Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(doEncode(o[i]),",")}a[a.length-1]="]";return a.join("")},encodeObject=function(o){var a=["{",""],i;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){a.push(doEncode(i),":",doEncode(o[i]),",")}}a[a.length-1]="}";return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode}return ec(o)}}();this.decode=function(){var dc;return function(json,safe){if(!dc){dc=isNative()?JSON.parse:doDecode}try{return dc(json)}catch(e){if(safe===true){return null}Ext.Error.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}}}()})();Ext.encode=Ext.JSON.encode;Ext.decode=Ext.JSON.decode;Ext.apply(Ext,{userAgent:navigator.userAgent.toLowerCase(),cache:{},idSeed:1000,windowId:"ext-window",documentId:"ext-document",isReady:false,enableGarbageCollector:true,enableListenerCollection:true,enableSandbox:false,id:function(a,c){var b=this,d="";a=Ext.getDom(a,true)||{};if(a===document){a.id=b.documentId}else{if(a===window){a.id=b.windowId}}if(!a.id){if(b.isSandboxed){d=Ext.sandboxName.toLowerCase()+"-"}a.id=d+(c||"ext-gen")+(++Ext.idSeed)}return a.id},getBody:function(){var a;return function(){return a||(a=Ext.get(document.body))}}(),getHead:function(){var a;return function(){return a||(a=Ext.get(document.getElementsByTagName("head")[0]))}}(),getDoc:function(){var a;return function(){return a||(a=Ext.get(document))}}(),getCmp:function(a){return Ext.ComponentManager.get(a)},getOrientation:function(){return window.innerHeight>window.innerWidth?"portrait":"landscape"},destroy:function(){var c=arguments.length,b,a;for(b=0;b<c;b++){a=arguments[b];if(a){if(Ext.isArray(a)){this.destroy.apply(this,a)}else{if(Ext.isFunction(a.destroy)){a.destroy()}else{if(a.dom){a.remove()}}}}}},callback:function(d,c,b,a){if(Ext.isFunction(d)){b=b||[];c=c||window;if(a){Ext.defer(d,a,c,b)}else{d.apply(c,b)}}},htmlEncode:function(a){return Ext.String.htmlEncode(a)},htmlDecode:function(a){return Ext.String.htmlDecode(a)},urlAppend:function(a,b){return Ext.String.urlAppend(a,b)}});Ext.ns=Ext.namespace;window.undefined=window.undefined;(function(){var n=function(e){return e.test(Ext.userAgent)},r=document.compatMode=="CSS1Compat",D=function(P,O){var e;return(P&&(e=O.exec(Ext.userAgent)))?parseFloat(e[1]):0},o=document.documentMode,a=n(/opera/),t=a&&n(/version\/10\.5/),I=n(/\bchrome\b/),x=n(/webkit/),c=!I&&n(/safari/),G=c&&n(/applewebkit\/4/),E=c&&n(/version\/3/),B=c&&n(/version\/4/),A=c&&n(/version\/5/),i=!a&&n(/msie/),H=i&&((n(/msie 7/)&&o!=8&&o!=9)||o==7),F=i&&((n(/msie 8/)&&o!=7&&o!=9)||o==8),C=i&&((n(/msie 9/)&&o!=7&&o!=8)||o==9),K=i&&n(/msie 6/),b=!x&&n(/gecko/),N=b&&n(/rv:1\.9/),M=b&&n(/rv:2\.0/),L=b&&n(/rv:5\./),w=N&&n(/rv:1\.9\.0/),u=N&&n(/rv:1\.9\.1/),s=N&&n(/rv:1\.9\.2/),g=n(/windows|win32/),z=n(/macintosh|mac os x/),v=n(/linux/),k=null,l=D(true,/\bchrome\/(\d+\.\d+)/),h=D(true,/\bfirefox\/(\d+\.\d+)/),m=D(i,/msie (\d+\.\d+)/),q=D(a,/version\/(\d+\.\d+)/),d=D(c,/version\/(\d+\.\d+)/),y=D(x,/webkit\/(\d+\.\d+)/),p=/^https/i.test(window.location.protocol);try{document.execCommand("BackgroundImageCache",false,true)}catch(J){}var j=function(){};j.info=j.warn=j.error=Ext.emptyFn;Ext.setVersion("extjs","4.1.0");Ext.apply(Ext,{SSL_SECURE_URL:p&&i?"javascript:''":"about:blank",scopeResetCSS:Ext.buildSettings.scopeResetCSS,enableNestedListenerRemoval:false,USE_NATIVE_JSON:false,getDom:function(P,O){if(!P||!document){return null}if(P.dom){return P.dom}else{if(typeof P=="string"){var Q=Ext.getElementById(P);if(Q&&i&&O){if(P==Q.getAttribute("id")){return Q}else{return null}}return Q}else{return P}}},removeNode:K||H?function(){var e;return function(O){if(O&&O.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(O):Ext.EventManager.removeAll(O);e=e||document.createElement("div");e.appendChild(O);e.innerHTML="";delete Ext.cache[O.id]}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){(Ext.enableNestedListenerRemoval)?Ext.EventManager.purgeElement(e):Ext.EventManager.removeAll(e);e.parentNode.removeChild(e);delete Ext.cache[e.id]}},isStrict:r,isIEQuirks:i&&!r,isOpera:a,isOpera10_5:t,isWebKit:x,isChrome:I,isSafari:c,isSafari3:E,isSafari4:B,isSafari5:A,isSafari2:G,isIE:i,isIE6:K,isIE7:H,isIE8:F,isIE9:C,isGecko:b,isGecko3:N,isGecko4:M,isGecko5:L,isFF3_0:w,isFF3_5:u,isFF3_6:s,isFF4:4<=h&&h<5,isFF5:5<=h&&h<6,isLinux:v,isWindows:g,isMac:z,chromeVersion:l,firefoxVersion:h,ieVersion:m,operaVersion:q,safariVersion:d,webKitVersion:y,isSecure:p,BLANK_IMAGE_URL:(K||H)?"//www.sencha.com/s.gif":"",value:function(P,e,O){return Ext.isEmpty(P,O)?e:P},escapeRe:function(e){return e.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},addBehaviors:function(R){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(R)})}else{var O={},Q,e,P;for(e in R){if((Q=e.split("@"))[1]){P=Q[0];if(!O[P]){O[P]=Ext.select(P)}O[P].on(Q[1],R[e])}}O=null}},getScrollbarSize:function(O){if(!Ext.isReady){return{}}if(O||!k){var e=document.body,P=document.createElement("div");P.style.width=P.style.height="100px";P.style.overflow="scroll";P.style.position="absolute";e.appendChild(P);k={width:P.offsetWidth-P.clientWidth,height:P.offsetHeight-P.clientHeight};e.removeChild(P)}return k},getScrollBarWidth:function(O){var e=Ext.getScrollbarSize(O);return e.width+2},copyTo:function(e,O,Q,P){if(typeof Q=="string"){Q=Q.split(/[,;\s]/)}Ext.each(Q,function(R){if(P||O.hasOwnProperty(R)){e[R]=O[R]}},this);return e},destroyMembers:function(Q){for(var P=1,O=arguments,e=O.length;P<e;P++){Ext.destroy(Q[O[P]]);delete Q[O[P]]}},log:j,partition:function(e,O){var P=[[],[]];Ext.each(e,function(R,S,Q){P[(O&&O(R,S,Q))||(!O&&R)?0:1].push(R)});return P},invoke:function(e,O){var Q=[],P=Array.prototype.slice.call(arguments,2);Ext.each(e,function(R,S){if(R&&typeof R[O]=="function"){Q.push(R[O].apply(R,P))}else{Q.push(undefined)}});return Q},zip:function(){var U=Ext.partition(arguments,function(V){return typeof V!="function"}),R=U[0],T=U[1][0],e=Ext.max(Ext.pluck(R,"length")),Q=[];for(var S=0;S<e;S++){Q[S]=[];if(T){Q[S]=T.apply(T,Ext.pluck(R,S))}else{for(var P=0,O=R.length;P<O;P++){Q[S].push(R[P][S])}}}return Q},toSentence:function(O,e){var R=O.length;if(R<=1){return O[0]}else{var Q=O.slice(0,R-1),P=O[R-1];return Ext.util.Format.format("{0} {1} {2}",Q.join(", "),e||"and",P)}},useShims:K})})();Ext.application=function(a){Ext.require("Ext.app.Application");Ext.onReady(function(){new Ext.app.Application(a)})};(function(){Ext.ns("Ext.util");Ext.util.Format={};var g=Ext.util.Format,e=/<\/?[^>]+>/gi,c=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,b=/\r?\n/g,d=/[^\d\.]/g,a;Ext.apply(g,{thousandSeparator:",",decimalSeparator:".",currencyPrecision:2,currencySign:"$",currencyAtEnd:false,undef:function(h){return h!==undefined?h:""},defaultValue:function(i,h){return i!==undefined&&i!==""?i:h},substr:function(i,j,h){return String(i).substr(j,h)},lowercase:function(h){return String(h).toLowerCase()},uppercase:function(h){return String(h).toUpperCase()},usMoney:function(h){return g.currency(h,"$",2)},currency:function(k,m,j,h){var o="",n=",0",l=0;k=k-0;if(k<0){k=-k;o="-"}j=Ext.isDefined(j)?j:g.currencyPrecision;n+=n+(j>0?".":"");for(;l<j;l++){n+="0"}k=g.number(k,n);if((h||g.currencyAtEnd)===true){return Ext.String.format("{0}{1}{2}",o,k,m||g.currencySign)}else{return Ext.String.format("{0}{1}{2}",o,m||g.currencySign,k)}},date:function(h,i){if(!h){return""}if(!Ext.isDate(h)){h=new Date(Date.parse(h))}return Ext.Date.dateFormat(h,i||Ext.Date.defaultFormat)},dateRenderer:function(h){return function(i){return g.date(i,h)}},stripTags:function(h){return !h?h:String(h).replace(e,"")},stripScripts:function(h){return !h?h:String(h).replace(c,"")},fileSize:function(h){if(h<1024){return h+" bytes"}else{if(h<1048576){return(Math.round(((h*10)/1024))/10)+" KB"}else{return(Math.round(((h*10)/1048576))/10)+" MB"}}},math:function(){var h={};return function(j,i){if(!h[i]){h[i]=Ext.functionFactory("v","return v "+i+";")}return h[i](j)}}(),round:function(j,i){var h=Number(j);if(typeof i=="number"){i=Math.pow(10,i);h=Math.round(j*i)/i}return h},number:function(y,s){if(!s){return y}y=Ext.Number.from(y,NaN);if(isNaN(y)){return""}var A=g.thousandSeparator,q=g.decimalSeparator,z=false,r=y<0,k,h;y=Math.abs(y);if(s.substr(s.length-2)=="/i"){if(!a){a=new RegExp("[^\\d\\"+g.decimalSeparator+"]","g")}s=s.substr(0,s.length-2);z=true;k=s.indexOf(A)!=-1;h=s.replace(a,"").split(q)}else{k=s.indexOf(",")!=-1;h=s.replace(d,"").split(".")}if(1<h.length){y=Ext.Number.toFixed(y,h[1].length)}else{if(2<h.length){}else{y=Ext.Number.toFixed(y,0)}}var x=y.toString();h=x.split(".");if(k){var w=h[0],p=[],t=w.length,o=Math.floor(t/3),l=w.length%3||3,u;for(u=0;u<t;u+=l){if(u!==0){l=3}p[p.length]=w.substr(u,l);o-=1}x=p.join(A);if(h[1]){x+=q+h[1]}}else{if(h[1]){x=h[0]+q+h[1]}}if(r){r=x.replace(/[^1-9]/g,"")!==""}return(r?"-":"")+s.replace(/[\d,?\.?]+/,x)},numberRenderer:function(h){return function(i){return g.number(i,h)}},plural:function(h,i,j){return h+" "+(h==1?i:(j?j:i+"s"))},nl2br:function(h){return Ext.isEmpty(h)?"":h.replace(b,"<br/>")},capitalize:Ext.String.capitalize,ellipsis:Ext.String.ellipsis,format:Ext.String.format,htmlDecode:Ext.String.htmlDecode,htmlEncode:Ext.String.htmlEncode,leftPad:Ext.String.leftPad,trim:Ext.String.trim,parseBox:function(i){if(Ext.isNumber(i)){i=i.toString()}var j=i.split(" "),h=j.length;if(h==1){j[1]=j[2]=j[3]=j[0]}else{if(h==2){j[2]=j[0];j[3]=j[1]}else{if(h==3){j[3]=j[1]}}}return{top:parseInt(j[0],10)||0,right:parseInt(j[1],10)||0,bottom:parseInt(j[2],10)||0,left:parseInt(j[3],10)||0}},escapeRegex:function(h){return h.replace(/([\-.*+?\^${}()|\[\]\/\\])/g,"\\$1")}})})();Ext.ns("Ext.util");Ext.util.TaskRunner=function(e){e=e||10;var g=[],a=[],b=0,h=false,d=function(){h=false;clearInterval(b);b=0},i=function(){if(!h){h=true;b=setInterval(j,e)}},c=function(k){a.push(k);if(k.onStop){k.onStop.apply(k.scope||k)}},j=function(){var m=a.length,o=new Date().getTime(),q;if(m>0){for(q=0;q<m;q++){Ext.Array.remove(g,a[q])}a=[];if(g.length<1){d();return}}q=0;var p,l,n,k=g.length;for(;q<k;++q){p=g[q];l=o-p.taskRunTime;if(p.interval<=l){n=p.run.apply(p.scope||p,p.args||[++p.taskRunCount]);p.taskRunTime=o;if(n===false||p.taskRunCount===p.repeat){c(p);return}}if(p.duration&&p.duration<=(o-p.taskStartTime)){c(p)}}};this.start=function(k){g.push(k);k.taskStartTime=new Date().getTime();k.taskRunTime=0;k.taskRunCount=0;i();return k};this.stop=function(k){c(k);return k};this.stopAll=function(){d();for(var l=0,k=g.length;l<k;l++){if(g[l].onStop){g[l].onStop()}}g=[];a=[]}};Ext.TaskManager=new Ext.util.TaskRunner();Ext.define("Ext.perf.Accumulator",function(){var c=null,d;var b=function(){b=function(){return new Date().getTime()};if(window.ActiveXObject){try{var k=new ActiveXObject("SenchaToolbox.Toolbox");b=function(){return k.milliseconds}}catch(l){}}Ext.perf.getTimestamp=Ext.perf.Accumulator.getTimestamp=b;return b()};function h(l,k){l.sum+=k;l.min=Math.min(l.min,k);l.max=Math.max(l.max,k)}function e(){var n=b(),m=this,k=m.accum,l=n-m.time;++k.count;if(!--k.depth){h(k.total,l)}h(k.pure,l-m.childTime);c=m.parent;if(c){++c.accum.childCount;c.childTime+=l}}function a(){return{min:Number.MAX_VALUE,max:0,sum:0}}function i(l,k){return function(){var n=l.enter(),m=k.apply(this,arguments);n.leave();return m}}function j(k){return Math.round(k*100)/100}function g(m,l,k,o){var n={avg:0,min:o.min,max:o.max,sum:0};if(m){k=k||0;n.sum=o.sum-l*k;n.avg=n.sum/m}return n}return{constructor:function(k){var l=this;l.count=l.childCount=l.depth=l.maxDepth=0;l.pure=a();l.total=a();l.name=k},statics:{getTimestamp:b},format:function(k){if(!d){d=new Ext.XTemplate(["{name} - {count} call(s)",'<tpl if="count">','<tpl if="childCount">'," ({childCount} children)","</tpl>",'<tpl if="depth - 1">'," ({depth} deep)","</tpl>",'<tpl for="times">',", {type}: {[this.time(values.sum)]} msec (","avg={[this.time(values.sum / parent.count)]}",")","</tpl>","</tpl>"].join(""),{time:function(m){return Math.round(m*100)/100}})}var l=this.getData(k);l.name=this.name;l.pure.type="Pure";l.total.type="Total";l.times=[l.pure,l.total];return d.apply(l)},getData:function(k){var l=this;return{count:l.count,childCount:l.childCount,depth:l.maxDepth,pure:g(l.count,l.childCount,k,l.pure),total:g(l.count,l.childCount,k,l.total)}},enter:function(){var k=this,l={accum:k,leave:e,childTime:0,parent:c};++k.depth;if(k.maxDepth<k.depth){k.maxDepth=k.depth}c=l;l.time=b();return l},monitor:function(m,l,k){var n=this.enter();if(k){m.apply(l,k)}else{m.call(l)}n.leave()},report:function(){Ext.log(this.format())},tap:function(r,t){var s=this,n=typeof t=="string"?[t]:t,q,u,p,o,m,l,k;if(typeof r=="string"){q=Ext.global;o=r.split(".");for(p=0,m=o.length;p<m;++p){q=q[o[p]]}}else{q=r}for(p=0,m=n.length;p<m;++p){l=n[p];u=l.charAt(0)=="!";if(u){l=l.substring(1)}else{u=!(l in q.prototype)}k=u?q:q.prototype;k[l]=i(s,k[l])}return s}}}(),function(){Ext.perf.getTimestamp=this.getTimestamp});Ext.define("Ext.perf.Monitor",{singleton:true,alternateClassName:"Ext.Perf",requires:["Ext.perf.Accumulator"],constructor:function(){this.accumulators=[];this.accumulatorsByName={}},calibrate:function(){var b=new Ext.perf.Accumulator("$"),g=b.total,c=Ext.perf.Accumulator.getTimestamp,e=0,h,a,d;d=c();do{h=b.enter();h.leave();++e}while(g.sum<100);a=c();return(a-d)/e},get:function(b){var c=this,a=c.accumulatorsByName[b];if(!a){c.accumulatorsByName[b]=a=new Ext.perf.Accumulator(b);c.accumulators.push(a)}return a},enter:function(a){return this.get(a).enter()},monitor:function(a,c,b){this.get(a).monitor(c,b)},report:function(){var d=this,c=d.accumulators,a=d.calibrate(),b=["Calibration: "+Math.round(a*100)/100+" msec/sample"];c.sort(function(g,e){return(g.name<e.name)?-1:((e.name<g.name)?1:0)});Ext.each(c,function(e){b.push(e.format(a))});Ext.log(b.join("\n"))},getData:function(c){var b={},a=this.accumulators;Ext.each(a,function(d){if(c||d.count){b[d.name]=d.getData()}});return b},setup:function(a){if(!a){a={render:{"Ext.AbstractComponent":"render"},layout:{"Ext.layout.Context":"run"}}}Ext.Object.each(a,function(b,d){var c=Ext.Perf.get(b);Ext.Object.each(d,function(g,e){c.tap(g,e)})})}});Ext.is={init:function(b){var c=this.platforms,e=c.length,d,a;b=b||window.navigator;for(d=0;d<e;d++){a=c[d];this[a.identity]=a.regex.test(b[a.property])}this.Desktop=this.Mac||this.Windows||(this.Linux&&!this.Android);this.Tablet=this.iPad;this.Phone=!this.Desktop&&!this.Tablet;this.iOS=this.iPhone||this.iPad||this.iPod;this.Standalone=!!window.navigator.standalone},platforms:[{property:"platform",regex:/iPhone/i,identity:"iPhone"},{property:"platform",regex:/iPod/i,identity:"iPod"},{property:"userAgent",regex:/iPad/i,identity:"iPad"},{property:"userAgent",regex:/Blackberry/i,identity:"Blackberry"},{property:"userAgent",regex:/Android/i,identity:"Android"},{property:"platform",regex:/Mac/i,identity:"Mac"},{property:"platform",regex:/Win/i,identity:"Windows"},{property:"platform",regex:/Linux/i,identity:"Linux"}]};Ext.is.init();Ext.supports={init:function(){var c=this,d=document,b=c.tests,h=b.length,g=h&&Ext.isReady&&d.createElement("div"),e,a=[];if(g){g.innerHTML=['<div style="height:30px;width:50px;">','<div style="height:20px;width:20px;"></div>',"</div>",'<div style="width: 200px; height: 200px; position: relative; padding: 5px;">','<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></div>',"</div>",'<div style="position: absolute; left: 10%; top: 10%;"></div>','<div style="float:left; background-color:transparent;"></div>'].join("");d.body.appendChild(g)}while(h--){e=b[h];if(g||e.early){c[e.identity]=e.fn.call(c,d,g)}else{a.push(e)}}if(g){d.body.removeChild(g)}c.tests=a},PointerEvents:"pointerEvents" in document.documentElement.style,CSS3BoxShadow:"boxShadow" in document.documentElement.style,ClassList:!!document.documentElement.classList,OrientationChange:((typeof window.orientation!="undefined")&&("onorientationchange" in window)),DeviceMotion:("ondevicemotion" in window),Touch:("ontouchstart" in window)&&(!Ext.is.Desktop),tests:[{identity:"Transitions",fn:function(g,j){var e=["webkit","Moz","o","ms","khtml"],h="TransitionEnd",a=[e[0]+h,"transitionend",e[2]+h,e[3]+h,e[4]+h],d=e.length,c=0,b=false;j=Ext.get(j);for(;c<d;c++){if(j.getStyle(e[c]+"TransitionProperty")){Ext.supports.CSS3Prefix=e[c];Ext.supports.CSS3TransitionEnd=a[c];b=true;break}}return b}},{identity:"RightMargin",fn:function(b,c){var a=b.defaultView;return !(a&&a.getComputedStyle(c.firstChild.firstChild,null).marginRight!="0px")}},{identity:"DisplayChangeInputSelectionBug",early:true,fn:function(){var a=Ext.webKitVersion;return 0<a&&a<533}},{identity:"DisplayChangeTextAreaSelectionBug",early:true,fn:function(){var a=Ext.webKitVersion;return 0<a&&a<534.24}},{identity:"TransparentColor",fn:function(b,c,a){a=b.defaultView;return !(a&&a.getComputedStyle(c.lastChild,null).backgroundColor!="transparent")}},{identity:"ComputedStyle",fn:function(b,c,a){a=b.defaultView;return a&&a.getComputedStyle}},{identity:"Svg",fn:function(a){return !!a.createElementNS&&!!a.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect}},{identity:"Canvas",fn:function(a){return !!a.createElement("canvas").getContext}},{identity:"Vml",fn:function(a){var b=a.createElement("div");b.innerHTML="<!--[if vml]><br><br><![endif]-->";return(b.childNodes.length==2)}},{identity:"Float",fn:function(a,b){return !!b.lastChild.style.cssFloat}},{identity:"AudioTag",fn:function(a){return !!a.createElement("audio").canPlayType}},{identity:"History",fn:function(){var a=window.history;return !!(a&&a.pushState)}},{identity:"CSS3DTransform",fn:function(){return(typeof WebKitCSSMatrix!="undefined"&&new WebKitCSSMatrix().hasOwnProperty("m41"))}},{identity:"CSS3LinearGradient",fn:function(e,h){var d="background-image:",b="-webkit-gradient(linear, left top, right bottom, from(black), to(white))",g="linear-gradient(left top, black, white)",c="-moz-"+g,a=[d+b,d+g,d+c];h.style.cssText=a.join(";");return(""+h.style.backgroundImage).indexOf("gradient")!==-1}},{identity:"CSS3BorderRadius",fn:function(d,e){var b=["borderRadius","BorderRadius","MozBorderRadius","WebkitBorderRadius","OBorderRadius","KhtmlBorderRadius"],c=false,a;for(a=0;a<b.length;a++){if(document.body.style[b[a]]!==undefined){return true}}return c}},{identity:"GeoLocation",fn:function(){return(typeof navigator!="undefined"&&typeof navigator.geolocation!="undefined")||(typeof google!="undefined"&&typeof google.gears!="undefined")}},{identity:"MouseEnterLeave",fn:function(a,b){return("onmouseenter" in b&&"onmouseleave" in b)}},{identity:"MouseWheel",fn:function(a,b){return("onmousewheel" in b)}},{identity:"Opacity",fn:function(a,b){if(Ext.isIE6||Ext.isIE7||Ext.isIE8){return false}b.firstChild.style.cssText="opacity:0.73";return b.firstChild.style.opacity=="0.73"}},{identity:"Placeholder",fn:function(a){return"placeholder" in a.createElement("input")}},{identity:"Direct2DBug",fn:function(){return Ext.isString(document.body.style.msTransformOrigin)}},{identity:"BoundingClientRect",fn:function(a,b){return Ext.isFunction(b.getBoundingClientRect)}},{identity:"IncludePaddingInWidthCalculation",fn:function(b,c){var a=Ext.get(c.childNodes[1].firstChild);return a.getWidth()==210}},{identity:"IncludePaddingInHeightCalculation",fn:function(b,c){var a=Ext.get(c.childNodes[1].firstChild);return a.getHeight()==210}},{identity:"ArraySort",fn:function(){var b=[1,2,3,4,5].sort(function(){return 0});return b[0]===1&&b[1]===2&&b[2]===3&&b[3]===4&&b[4]===5}},{identity:"Range",fn:function(){return !!document.createRange}},{identity:"CreateContextualFragment",fn:function(){var a=Ext.supports.Range?document.createRange():false;return a&&!!a.createContextualFragment}},{identity:"WindowOnError",fn:function(){return Ext.isIE||Ext.isGecko||Ext.webKitVersion>=534.16}},{identity:"TextAreaMaxLength",fn:function(){var a=document.createElement("textarea");return("maxlength" in a)}},{identity:"GetPositionPercentage",fn:function(a,b){return Ext.get(b.childNodes[2]).getStyle("left")=="10%"}}]};Ext.supports.init();Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};this.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};this.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.require("Ext.util.DelayedTask",function(){Ext.util.Event=Ext.extend(Object,(function(){function b(e,g,h,d){g.task=new Ext.util.DelayedTask();return function(){g.task.delay(h.buffer,e,d,Ext.Array.toArray(arguments))}}function a(e,g,h,d){return function(){var i=new Ext.util.DelayedTask();if(!g.tasks){g.tasks=[]}g.tasks.push(i);i.delay(h.delay||10,e,d,Ext.Array.toArray(arguments))}}function c(e,g,h,d){return function(){g.ev.removeListener(g.fn,d);return e.apply(d,arguments)}}return{isEvent:true,constructor:function(e,d){this.name=d;this.observable=e;this.listeners=[]},addListener:function(g,e,d){var h=this,i;e=e||h.observable;if(!h.isListening(g,e)){i=h.createListener(g,e,d);if(h.firing){h.listeners=h.listeners.slice(0)}h.listeners.push(i)}},createListener:function(g,e,i){i=i||{};e=e||this.observable;var h={fn:g,scope:e,o:i,ev:this},d=g;if(i.single){d=c(d,h,i,e)}if(i.delay){d=a(d,h,i,e)}if(i.buffer){d=b(d,h,i,e)}h.fireFn=d;return h},findListener:function(j,h){var g=this.listeners,d=g.length,k,e;while(d--){k=g[d];if(k){e=k.scope;if(k.fn==j&&(e==h||e==this.observable)){return d}}}return -1},isListening:function(e,d){return this.findListener(e,d)!==-1},removeListener:function(h,g){var i=this,e,j,d;e=i.findListener(h,g);if(e!=-1){j=i.listeners[e];if(i.firing){i.listeners=i.listeners.slice(0)}if(j.task){j.task.cancel();delete j.task}d=j.tasks&&j.tasks.length;if(d){while(d--){j.tasks[d].cancel()}delete j.tasks}Ext.Array.erase(i.listeners,e,1);return true}return false},clearListeners:function(){var e=this.listeners,d=e.length;while(d--){this.removeListener(e[d].fn,e[d].scope)}},fire:function(){var j=this,g=j.listeners,h=g.length,e,d,k;if(h>0){j.firing=true;for(e=0;e<h;e++){k=g[e];d=arguments.length?Array.prototype.slice.call(arguments,0):[];if(k.o){d.push(k.o)}if(k&&k.fireFn.apply(k.scope||j.observable,d)===false){return(j.firing=false)}}}j.firing=false;return true}}})())});Ext.EventManager={hasBoundOnReady:false,hasFiredReady:false,readyTimeout:null,hasOnReadyStateChange:false,readyEvent:new Ext.util.Event(),checkReadyState:function(){var a=Ext.EventManager;if(window.attachEvent){if(window!=top){return false}try{document.documentElement.doScroll("left")}catch(b){return false}a.fireDocReady();return true}if(document.readyState=="complete"){a.fireDocReady();return true}a.readyTimeout=setTimeout(arguments.callee,2);return false},bindReadyEvent:function(){var a=Ext.EventManager;if(a.hasBoundOnReady){return}if(document.addEventListener){document.addEventListener("DOMContentLoaded",a.fireDocReady,false);window.addEventListener("load",a.fireDocReady,false)}else{if(!a.checkReadyState()){document.attachEvent("onreadystatechange",a.checkReadyState);a.hasOnReadyStateChange=true}window.attachEvent("onload",a.fireDocReady,false)}a.hasBoundOnReady=true},fireDocReady:function(){var a=Ext.EventManager;if(!Ext.isReady){Ext.isReady=true;if(document.addEventListener){document.removeEventListener("DOMContentLoaded",a.fireDocReady,false);window.removeEventListener("load",a.fireDocReady,false)}else{if(a.readyTimeout!==null){clearTimeout(a.readyTimeout)}if(a.hasOnReadyStateChange){document.detachEvent("onreadystatechange",a.checkReadyState)}window.detachEvent("onload",a.fireDocReady)}Ext.supports.init();a.onWindowUnload();a.readyEvent.fire()}},onDocumentReady:function(c,b,a){a=a||{};var d=Ext.EventManager,e=d.readyEvent;a.single=true;e.addListener(c,b,a);if(Ext.isReady){e.fire()}else{if(document.readyState=="complete"){d.fireDocReady()}else{d.bindReadyEvent()}}},stoppedMouseDownEvent:new Ext.util.Event(),propRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|freezeEvent)$/,getId:function(a){var b=false,c;a=Ext.getDom(a);if(a===document||a===window){c=a===document?Ext.documentId:Ext.windowId}else{c=Ext.id(a)}if(a&&(a.getElementById||a.navigator)){b=true}if(!Ext.cache[c]){Ext.Element.addToCache(new Ext.Element(a),c);if(b){Ext.cache[c].skipGarbageCollection=true}}return c},prepareListenerConfig:function(d,b,h){var e=this,i=e.propRe,c,g,a;for(c in b){if(b.hasOwnProperty(c)){if(!i.test(c)){g=b[c];if(typeof g=="function"){a=[d,c,g,b.scope,b]}else{a=[d,c,g.fn,g.scope,g]}if(h){e.removeListener.apply(e,a)}else{e.addListener.apply(e,a)}}}}},mouseEnterLeaveRe:/mouseenter|mouseleave/,normalizeEvent:function(a,b){if(this.mouseEnterLeaveRe.test(a)&&!Ext.supports.MouseEnterLeave){if(b){b=Ext.Function.createInterceptor(b,this.contains,this)}a=a=="mouseenter"?"mouseover":"mouseout"}else{if(a=="mousewheel"&&!Ext.supports.MouseWheel&&!Ext.isOpera){a="DOMMouseScroll"}}return{eventName:a,fn:b}},contains:function(b){var a=b.browserEvent.currentTarget,c=this.getRelatedTarget(b);if(a&&a.firstChild){while(c){if(c===a){return false}c=c.parentNode;if(c&&(c.nodeType!=1)){c=null}}}return true},addListener:function(c,a,g,e,b){if(typeof a!=="string"){this.prepareListenerConfig(c,a);return}var h=c.dom||Ext.getDom(c),i,d;b=b||{};i=this.normalizeEvent(a,g);d=this.createListenerWrap(h,a,i.fn,e,b);if(h.attachEvent){h.attachEvent("on"+i.eventName,d)}else{h.addEventListener(i.eventName,d,b.capture||false)}if(h==document&&a=="mousedown"){this.stoppedMouseDownEvent.addListener(d)}this.getEventListenerCache(c.dom?c:h,a).push({fn:g,wrap:d,scope:e})},removeListener:function(l,m,n,p){if(typeof m!=="string"){this.prepareListenerConfig(l,m,true);return}var h=Ext.getDom(l),c=l.dom?l:Ext.get(h),a=this.getEventListenerCache(c,m),o=this.normalizeEvent(m).eventName,k=a.length,g,d,b,e;while(k--){d=a[k];if(d&&(!n||d.fn==n)&&(!p||d.scope===p)){b=d.wrap;if(b.task){clearTimeout(b.task);delete b.task}g=b.tasks&&b.tasks.length;if(g){while(g--){clearTimeout(b.tasks[g])}delete b.tasks}if(h.detachEvent){h.detachEvent("on"+o,b)}else{h.removeEventListener(o,b,false)}if(b&&h==document&&m=="mousedown"){this.stoppedMouseDownEvent.removeListener(b)}Ext.Array.erase(a,k,1)}}},removeAll:function(d){var e=d.dom?d:Ext.get(d),b,c,a;if(!e){return}b=e.$cache;c=b.events;for(a in c){if(c.hasOwnProperty(a)){this.removeListener(e,a)}}b.events={}},purgeElement:function(d,b){var e=Ext.getDom(d),c=0,a;if(b){this.removeListener(d,b)}else{this.removeAll(d)}if(e&&e.childNodes){for(a=d.childNodes.length;c<a;c++){this.purgeElement(d.childNodes[c],b)}}},createListenerWrap:function(i,b,e,d,a){a=a||{};var g,h;return function c(k,j){if(!h){g=["if(!"+Ext.name+") {return;}"];if(a.buffer||a.delay||a.freezeEvent){g.push("e = new "+Ext.name+".EventObjectImpl(e, "+(a.freezeEvent?"true":"false")+");")}else{g.push("e = "+Ext.name+".EventObject.setEvent(e);")}if(a.delegate){g.push('var t = e.getTarget("'+a.delegate+'", this);');g.push("if(!t) {return;}")}else{g.push("var t = e.target;")}if(a.target){g.push("if(e.target !== options.target) {return;}")}if(a.stopEvent){g.push("e.stopEvent();")}else{if(a.preventDefault){g.push("e.preventDefault();")}if(a.stopPropagation){g.push("e.stopPropagation();")}}if(a.normalized===false){g.push("e = e.browserEvent;")}if(a.buffer){g.push("(wrap.task && clearTimeout(wrap.task));");g.push("wrap.task = setTimeout(function(){")}if(a.delay){g.push("wrap.tasks = wrap.tasks || [];");g.push("wrap.tasks.push(setTimeout(function(){")}g.push("fn.call(scope || dom, e, t, options);");if(a.single){g.push("Ext.EventManager.removeListener(dom, ename, fn, scope);")}if(a.delay){g.push("}, "+a.delay+"));")}if(a.buffer){g.push("}, "+a.buffer+");")}h=Ext.cacheableFunctionFactory("e","options","fn","scope","ename","dom","wrap","args",g.join("\n"))}h.call(i,k,a,e,d,b,i,c,j)}},getEventListenerCache:function(d,a){var c,b,e;if(!d){return[]}if(d.$cache){c=d.$cache}else{c=Ext.cache[e=this.getId(d)]||(Ext.cache[e]={})}b=c.events||(c.events={});return b[a]||(b[a]=[])},mouseLeaveRe:/(mouseout|mouseleave)/,mouseEnterRe:/(mouseover|mouseenter)/,stopEvent:function(a){this.stopPropagation(a);this.preventDefault(a)},stopPropagation:function(a){a=a.browserEvent||a;if(a.stopPropagation){a.stopPropagation()}else{a.cancelBubble=true}},preventDefault:function(a){a=a.browserEvent||a;if(a.preventDefault){a.preventDefault()}else{a.returnValue=false;try{if(a.ctrlKey||a.keyCode>111&&a.keyCode<124){a.keyCode=-1}}catch(b){}}},getRelatedTarget:function(a){a=a.browserEvent||a;var b=a.relatedTarget;if(!b){if(this.mouseLeaveRe.test(a.type)){b=a.toElement}else{if(this.mouseEnterRe.test(a.type)){b=a.fromElement}}}return this.resolveTextNode(b)},getPageX:function(a){return this.getXY(a)[0]},getPageY:function(a){return this.getXY(a)[1]},getPageXY:function(c){c=c.browserEvent||c;var b=c.pageX,e=c.pageY,d=document.documentElement,a=document.body;if(!b&&b!==0){b=c.clientX+(d&&d.scrollLeft||a&&a.scrollLeft||0)-(d&&d.clientLeft||a&&a.clientLeft||0);e=c.clientY+(d&&d.scrollTop||a&&a.scrollTop||0)-(d&&d.clientTop||a&&a.clientTop||0)}return[b,e]},getTarget:function(a){a=a.browserEvent||a;return this.resolveTextNode(a.target||a.srcElement)},resolveTextNode:Ext.isGecko?function(b){if(!b){return}var a=HTMLElement.prototype.toString.call(b);if(a=="[xpconnect wrapped native prototype]"||a=="[object XULElement]"){return}return b.nodeType==3?b.parentNode:b}:function(a){return a&&a.nodeType==3?a.parentNode:a},curWidth:0,curHeight:0,onWindowResize:function(d,c,b){var e=this,a=e.resizeEvent;if(!a){e.resizeEvent=a=new Ext.util.Event();e.on(window,"resize",e.fireResize,e,{buffer:100})}a.addListener(d,c,b)},fireResize:function(){var c=this,a=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight();if(c.curHeight!=b||c.curWidth!=a){c.curHeight=b;c.curWidth=a;c.resizeEvent.fire(a,b)}},removeResizeListener:function(c,b){var a=this.resizeEvent;if(a){a.removeListener(c,b)}},onWindowUnload:function(d,c,b){var e=this,a=e.unloadEvent;if(!a){e.unloadEvent=a=new Ext.util.Event();e.addListener(window,"unload",e.fireUnload,e)}if(d){a.addListener(d,c,b)}},fireUnload:function(){try{this.unloadEvent.fire();if(Ext.isGecko3){var h=Ext.ComponentQuery.query("gridview"),b=0,d=h.length;for(;b<d;b++){h[b].scrollToTop()}}var c,a=Ext.cache;for(c in a){if(a.hasOwnProperty(c)){Ext.EventManager.removeAll(c)}}}catch(g){}},removeUnloadListener:function(c,b){var a=this.unloadEvent;if(a){a.removeListener(c,b)}},useKeyDown:Ext.isWebKit?parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1],10)>=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera),getKeyEvent:function(){return this.useKeyDown?"keydown":"keypress"}};Ext.onReady=function(c,b,a){Ext.Loader.onReady(c,b,true,a)};Ext.onDocumentReady=Ext.EventManager.onDocumentReady;Ext.EventManager.on=Ext.EventManager.addListener;Ext.EventManager.un=Ext.EventManager.removeListener;(function(){var a=function(){var g=document.body||document.getElementsByTagName("body")[0],e=Ext.baseCSSPrefix,c=[e+"body"],b=[],d;if(!g){return false}d=g.parentNode;function h(i){c.push(e+i)}if(Ext.isIE){h("ie");if(Ext.isIE6){h("ie6")}else{h("ie7p");if(Ext.isIE7){h("ie7")}else{h("ie8p");if(Ext.isIE8){h("ie8")}else{h("ie9p");if(Ext.isIE9){h("ie9")}}}}if(Ext.isIE6||Ext.isIE7){h("ie7m")}if(Ext.isIE6||Ext.isIE7||Ext.isIE8){h("ie8m")}if(Ext.isIE7||Ext.isIE8){h("ie78")}}if(Ext.isGecko){h("gecko");if(Ext.isGecko3){h("gecko3")}if(Ext.isGecko4){h("gecko4")}if(Ext.isGecko5){h("gecko5")}}if(Ext.isOpera){h("opera")}if(Ext.isWebKit){h("webkit")}if(Ext.isSafari){h("safari");if(Ext.isSafari2){h("safari2")}if(Ext.isSafari3){h("safari3")}if(Ext.isSafari4){h("safari4")}if(Ext.isSafari5){h("safari5")}}if(Ext.isChrome){h("chrome")}if(Ext.isMac){h("mac")}if(Ext.isLinux){h("linux")}if(!Ext.supports.CSS3BorderRadius){h("nbr")}if(!Ext.supports.CSS3LinearGradient){h("nlg")}if(!Ext.scopeResetCSS){h("reset")}if(d){if(Ext.isStrict&&(Ext.isIE6||Ext.isIE7)){Ext.isBorderBox=false}else{Ext.isBorderBox=true}b.push(e+(Ext.isBorderBox?"border-box":"strict"));if(!Ext.isStrict){b.push(e+"quirks")}Ext.fly(d,"_internal").addCls(b)}Ext.fly(g,"_internal").addCls(c);return true};Ext.onReady(a)})();Ext.define("Ext.EventObjectImpl",{uses:["Ext.util.Point"],BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,WHEEL_SCALE:(function(){var a;if(Ext.isGecko){a=3}else{if(Ext.isMac){if(Ext.isSafari&&Ext.webKitVersion>=532){a=120}else{a=12}a*=3}else{a=120}}return a})(),clickRe:/(dbl)?click/,safariKeys:{3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},btnMap:Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2},constructor:function(a,b){if(a){this.setEvent(a.browserEvent||a,b)}},setEvent:function(d,e){var c=this,b,a;if(d==c||(d&&d.browserEvent)){return d}c.browserEvent=d;if(d){b=d.button?c.btnMap[d.button]:(d.which?d.which-1:-1);if(c.clickRe.test(d.type)&&b==-1){b=0}a={type:d.type,button:b,shiftKey:d.shiftKey,ctrlKey:d.ctrlKey||d.metaKey||false,altKey:d.altKey,keyCode:d.keyCode,charCode:d.charCode,target:Ext.EventManager.getTarget(d),relatedTarget:Ext.EventManager.getRelatedTarget(d),currentTarget:d.currentTarget,xy:(e?c.getXY():null)}}else{a={button:-1,shiftKey:false,ctrlKey:false,altKey:false,keyCode:0,charCode:0,target:null,xy:[0,0]}}Ext.apply(c,a);return c},stopEvent:function(){this.stopPropagation();this.preventDefault()},preventDefault:function(){if(this.browserEvent){Ext.EventManager.preventDefault(this.browserEvent)}},stopPropagation:function(){var a=this.browserEvent;if(a){if(a.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(this)}Ext.EventManager.stopPropagation(a)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(a){return Ext.isWebKit?(this.safariKeys[a]||a):a},getPageX:function(){return this.getX()},getPageY:function(){return this.getY()},getX:function(){return this.getXY()[0]},getY:function(){return this.getXY()[1]},getXY:function(){if(!this.xy){this.xy=Ext.EventManager.getPageXY(this.browserEvent)}return this.xy},getTarget:function(b,c,a){if(b){return Ext.fly(this.target).findParent(b,c,a)}return a?Ext.get(this.target):this.target},getRelatedTarget:function(b,c,a){if(b){return Ext.fly(this.relatedTarget).findParent(b,c,a)}return a?Ext.get(this.relatedTarget):this.relatedTarget},correctWheelDelta:function(c){var b=this.WHEEL_SCALE,a=Math.round(c/b);if(!a&&c){a=(c<0)?-1:1}return a},getWheelDeltas:function(){var d=this,c=d.browserEvent,b=0,a=0;if(Ext.isDefined(c.wheelDeltaX)){b=c.wheelDeltaX;a=c.wheelDeltaY}else{if(c.wheelDelta){a=c.wheelDelta}else{if(c.detail){a=-c.detail;if(a>100){a=3}else{if(a<-100){a=-3}}if(Ext.isDefined(c.axis)&&c.axis===c.HORIZONTAL_AXIS){b=a;a=0}}}}return{x:d.correctWheelDelta(b),y:d.correctWheelDelta(a)}},getWheelDelta:function(){var a=this.getWheelDeltas();return a.y},within:function(d,e,b){if(d){var c=e?this.getRelatedTarget():this.getTarget(),a;if(c){a=Ext.fly(d).contains(c);if(!a&&b){a=c==Ext.getDom(d)}return a}}return false},isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){var a=this.getXY();return new Ext.util.Point(a[0],a[1])},hasModifier:function(){return this.ctrlKey||this.altKey||this.shiftKey||this.metaKey},injectEvent:function(){var d,e={};if(!Ext.isIE&&document.createEvent){d={createHtmlEvent:function(k,i,h,g){var j=k.createEvent("HTMLEvents");j.initEvent(i,h,g);return j},createMouseEvent:function(u,s,m,l,o,k,i,j,g,r,q,n,p){var h=u.createEvent("MouseEvents"),t=u.defaultView||window;if(h.initMouseEvent){h.initMouseEvent(s,m,l,t,o,k,i,k,i,j,g,r,q,n,p)}else{h=u.createEvent("UIEvents");h.initEvent(s,m,l);h.view=t;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.metaKey=q;h.shiftKey=r;h.button=n;h.relatedTarget=p}return h},createUIEvent:function(m,k,i,h,j){var l=m.createEvent("UIEvents"),g=m.defaultView||window;l.initUIEvent(k,i,h,g,j);return l},fireEvent:function(i,g,h){i.dispatchEvent(h)},fixTarget:function(g){if(g==window&&!g.dispatchEvent){return document}return g}}}else{if(document.createEventObject){var c={0:1,1:4,2:2};d={createHtmlEvent:function(k,i,h,g){var j=k.createEventObject();j.bubbles=h;j.cancelable=g;return j},createMouseEvent:function(t,s,m,l,o,k,i,j,g,r,q,n,p){var h=t.createEventObject();h.bubbles=m;h.cancelable=l;h.detail=o;h.screenX=k;h.screenY=i;h.clientX=k;h.clientY=i;h.ctrlKey=j;h.altKey=g;h.shiftKey=r;h.metaKey=q;h.button=c[n]||n;h.relatedTarget=p;return h},createUIEvent:function(l,j,h,g,i){var k=l.createEventObject();k.bubbles=h;k.cancelable=g;return k},fireEvent:function(i,g,h){i.fireEvent("on"+g,h)},fixTarget:function(g){if(g==document){return document.documentElement}return g}}}}Ext.Object.each({load:[false,false],unload:[false,false],select:[true,false],change:[true,false],submit:[true,true],reset:[true,false],resize:[true,false],scroll:[true,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createHtmlEvent(i,h,g);d.fireEvent(m,i,l)}});function b(i,h){var g=(i!="mousemove");return function(m,j){var l=j.getXY(),k=d.createMouseEvent(m.ownerDocument,i,true,g,h,l[0],l[1],j.ctrlKey,j.altKey,j.shiftKey,j.metaKey,j.button,j.relatedTarget);d.fireEvent(m,i,k)}}Ext.each(["click","dblclick","mousedown","mouseup","mouseover","mousemove","mouseout"],function(g){e[g]=b(g,1)});Ext.Object.each({focusin:[true,false],focusout:[true,false],activate:[true,true],focus:[false,false],blur:[false,false]},function(i,j){var h=j[0],g=j[1];e[i]=function(m,k){var l=d.createUIEvent(m.ownerDocument,i,h,g,1);d.fireEvent(m,i,l)}});if(!d){e={};d={fixTarget:function(g){return g}}}function a(h,g){}return function(j){var i=this,h=e[i.type]||a,g=j?(j.dom||j):i.getTarget();g=d.fixTarget(g);h(g,i)}}()},function(){Ext.EventObject=new Ext.EventObjectImpl()});Ext.define("Ext.dom.AbstractQuery",{select:function(k,b){var h=[],d,g,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}k=k.split(",");for(g=0,c=k.length;g<c;g++){if(typeof k[g]=="string"){if(typeof k[g][0]=="@"){d=b.getAttributeNode(k[g].substring(1));h.push(d)}else{d=b.querySelectorAll(k[g]);for(e=0,a=d.length;e<a;e++){h.push(d[e])}}}}return h},selectNode:function(b,a){return this.select(b,a)[0]},is:function(a,b){if(typeof a=="string"){a=document.getElementById(a)}return this.select(b).indexOf(a)!==-1}});Ext.define("Ext.dom.AbstractHelper",{emptyTags:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,confRe:/tag|children|cn|html|tpl|tplData$/i,endRe:/end/i,attribXlat:{cls:"class",htmlFor:"for"},closeTags:{},decamelizeName:function(){var c=/([a-z])([A-Z])/g,b={};function a(d,g,e){return g+"-"+e.toLowerCase()}return function(d){return b[d]||(b[d]=d.replace(c,a))}}(),generateMarkup:function(d,c){var h=this,b,j,a,e,g;if(typeof d=="string"){c.push(d)}else{if(Ext.isArray(d)){for(e=0;e<d.length;e++){if(d[e]){h.generateMarkup(d[e],c)}}}else{a=d.tag||"div";c.push("<",a);for(b in d){if(d.hasOwnProperty(b)){j=d[b];if(!h.confRe.test(b)){if(typeof j=="object"){c.push(" ",b,'="');h.generateStyles(j,c).push('"')}else{c.push(" ",h.attribXlat[b]||b,'="',j,'"')}}}}if(h.emptyTags.test(a)){c.push("/>")}else{c.push(">");if((j=d.tpl)){j.applyOut(d.tplData,c)}if((j=d.html)){c.push(j)}if((j=d.cn||d.children)){h.generateMarkup(j,c)}g=h.closeTags;c.push(g[a]||(g[a]="</"+a+">"))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(d,e){if(e){var b=0,a,c;d=Ext.fly(d);if(typeof e=="function"){e=e.call()}if(typeof e=="string"){e=Ext.util.Format.trim(e).split(/\s*(?::|;)\s*/);for(a=e.length;b<a;){d.setStyle(e[b++],e[b++])}}else{if(Ext.isObject(e)){d.setStyle(e)}}}},insertHtml:function(g,a,h){var e={},c,j,i,k,d,b;g=g.toLowerCase();e.beforebegin=["BeforeBegin","previousSibling"];e.afterend=["AfterEnd","nextSibling"];i=a.ownerDocument.createRange();j="setStart"+(this.endRe.test(g)?"After":"Before");if(e[g]){i[j](a);k=i.createContextualFragment(h);a.parentNode.insertBefore(k,g=="beforebegin"?a:a.nextSibling);return a[(g=="beforebegin"?"previous":"next")+"Sibling"]}else{d=(g=="afterbegin"?"first":"last")+"Child";if(a.firstChild){i[j](a[d]);k=i.createContextualFragment(h);if(g=="afterbegin"){a.insertBefore(k,a.firstChild)}else{a.appendChild(k)}}else{a.innerHTML=h}return a[d]}throw'Illegal insertion point -> "'+g+'"'},insertBefore:function(a,c,b){return this.doInsert(a,c,b,"beforebegin")},insertAfter:function(a,c,b){return this.doInsert(a,c,b,"afterend","nextSibling")},insertFirst:function(a,c,b){return this.doInsert(a,c,b,"afterbegin","firstChild")},append:function(a,c,b){return this.doInsert(a,c,b,"beforeend","",true)},overwrite:function(a,c,b){a=Ext.getDom(a);a.innerHTML=this.markup(c);return b?Ext.get(a.firstChild):a.firstChild},doInsert:function(d,g,e,h,c,a){var b=this.insertHtml(h,Ext.getDom(d),this.markup(g));return e?Ext.get(b,true):b}});(function(){var a=window.document,b=/^\s+|\s+$/g,c=/\s/;if(!Ext.cache){Ext.cache={}}Ext.define("Ext.dom.AbstractElement",{inheritableStatics:{get:function(e){var g=this,h=Ext.dom.Element,d,j,i,k;if(!e){return null}if(typeof e=="string"){if(e==Ext.windowId){return h.get(window)}else{if(e==Ext.documentId){return h.get(a)}}d=Ext.cache[e];if(d&&d.skipGarbageCollection){j=d.el;return j}if(!(i=a.getElementById(e))){return null}if(d&&d.el){j=d.el;j.dom=i}else{j=new h(i)}return j}else{if(e.tagName){if(!(k=e.id)){k=Ext.id(e)}if(Ext.cache[k]&&Ext.cache[k].el){j=Ext.cache[k].el;j.dom=e}else{j=new h(e)}return j}else{if(e instanceof g){if(e!=g.docEl&&e!=g.winEl){e.dom=a.getElementById(e.id)||e.dom}return e}else{if(e.isComposite){return e}else{if(Ext.isArray(e)){return g.select(e)}else{if(e===a){if(!g.docEl){g.docEl=Ext.Object.chain(h.prototype);g.docEl.dom=a;g.docEl.id=Ext.id(a);g.addToCache(g.docEl)}return g.docEl}else{if(e===window){if(!g.winEl){g.winEl=Ext.Object.chain(h.prototype);g.winEl.dom=window;g.winEl.id=Ext.id(window);g.addToCache(g.winEl)}return g.winEl}}}}}}}return null},addToCache:function(d,e){if(d){e=e||d.id;d.$cache=Ext.cache[e]||(Ext.cache[e]={data:{},events:{}});d.$cache.el=d}return d},data:function(e,d,g){e=this.get(e);if(!e){return null}var h=Ext.cache[e.id].data;if(!h){h=Ext.cache[e.id].data={}}if(arguments.length==2){return h[d]}else{return(h[d]=g)}},addMethods:function(){this.override.apply(this,arguments)},mergeClsList:function(){var n,m={},k,d,g,l,e,o=[],h=false;for(k=0,d=arguments.length;k<d;k++){n=arguments[k];if(Ext.isString(n)){n=n.replace(b,"").split(c)}if(n){for(g=0,l=n.length;g<l;g++){e=n[g];if(!m[e]){if(k){h=true}m[e]=true}}}}for(e in m){o.push(e)}o.changed=h;return o},removeCls:function(g,l){var e={},h,k,j,d=[],m=false;if(g){if(Ext.isString(g)){g=g.replace(b,"").split(c)}for(h=0,k=g.length;h<k;h++){e[g[h]]=true}}if(l){if(Ext.isString(l)){l=l.split(c)}for(h=0,k=l.length;h<k;h++){j=l[h];if(e[j]){m=true;delete e[j]}}}for(j in e){d.push(j)}d.changed=m;return d},VISIBILITY:1,DISPLAY:2,OFFSETS:3},constructor:function(d,e){var g=this,h=typeof d=="string"?a.getElementById(d):d,i;if(!h){return null}i=h.id;if(!e&&i&&Ext.cache[i]){return Ext.cache[i].el}g.dom=h;g.id=i||Ext.id(h);g.self.addToCache(g)},set:function(i,e){var g=this.dom,d,h;for(d in i){if(i.hasOwnProperty(d)){h=i[d];if(d=="style"){this.applyStyles(h)}else{if(d=="cls"){g.className=h}else{if(e!==false){if(h===undefined){g.removeAttribute(d)}else{g.setAttribute(d,h)}}else{g[d]=h}}}}}return this},defaultUnit:"px",is:function(d){return Ext.DomQuery.is(this.dom,d)},getValue:function(d){var e=this.dom.value;return d?parseInt(e,10):e},remove:function(){var d=this,e=d.dom;if(e){Ext.removeNode(e);delete d.dom}},contains:function(d){if(!d){return false}var e=this,g=d.dom||d;return(g===e.dom)||Ext.dom.AbstractElement.isAncestor(e.dom,g)},getAttribute:function(d,e){var g=this.dom;return g.getAttributeNS(e,d)||g.getAttribute(e+":"+d)||g.getAttribute(d)||g[d]},update:function(d){if(this.dom){this.dom.innerHTML=d}return this},setHTML:function(d){if(this.dom){this.dom.innerHTML=d}return this},getHTML:function(){return this.dom?this.dom.innerHTML:""},hide:function(){this.setVisible(false);return this},show:function(){this.setVisible(true);return this},setVisible:function(j,d){var e=this,i=e.self,h=e.getVisibilityMode(),g=Ext.baseCSSPrefix;switch(h){case i.VISIBILITY:e.removeCls([g+"hidden-display",g+"hidden-offsets"]);e[j?"removeCls":"addCls"](g+"hidden-visibility");break;case i.DISPLAY:e.removeCls([g+"hidden-visibility",g+"hidden-offsets"]);e[j?"removeCls":"addCls"](g+"hidden-display");break;case i.OFFSETS:e.removeCls([g+"hidden-visibility",g+"hidden-display"]);e[j?"removeCls":"addCls"](g+"hidden-offsets");break}return e},getVisibilityMode:function(){var d=(this.$cache||this).data,e=d.visibilityMode;if(e===undefined){d.visibilityMode=(e=this.self.DISPLAY)}return e},setVisibilityMode:function(d){(this.$cache||this).data.visibilityMode=d;return this}},function(){var d=this,e=/^[a-z0-9_\-]+$/i;Ext.getDetachedBody=function(){var g=d.detachedBodyEl;if(!g){g=a.createElement("div");d.detachedBodyEl=g=new d.Fly(g);g.isDetachedBody=true}return g};Ext.getElementById=function(i){var h=a.getElementById(i),g;if(!h&&(g=d.detachedBodyEl)&&e.test(i)){h=g.dom.querySelector("#"+i)}return h};Ext.get=function(g){return Ext.dom.Element.get(g)};this.addStatics({Fly:new Ext.Class({extend:d,constructor:function(g){this.dom=g},attach:function(h){var g=this;g.dom=h;g.id=h.id;return g}}),_flyweights:{},fly:function(j,h){var i=null,g=d._flyweights;h=h||"_global";j=Ext.getDom(j);if(j){i=g[h]||(g[h]=new d.Fly());i.dom=j;i.data={}}return i}});Ext.fly=function(){return d.fly.apply(d,arguments)};(function(g){g.destroy=g.remove;if(a.querySelector){g.getById=function(j,h){var i=a.getElementById(j)||(e.test(j)?this.dom.querySelector("#"+j):null);return h?i:(i?Ext.get(i):null)}}else{g.getById=function(j,h){var i=a.getElementById(j);return h?i:(i?Ext.get(i):null)}}})(this.prototype)})})();Ext.dom.AbstractElement.addInheritableStatics({unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(typeof b=="number"){return b+(a||this.defaultUnit||"px")}if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(!this.unitRe.test(b)){return b||""}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(b){if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:parseFloat(c[0])||0,right:parseFloat(c[1])||0,bottom:parseFloat(c[2])||0,left:parseFloat(c[3])||0}},unitizeBox:function(c,b){var a=this.addUnits,d=this.parseBox(c);return a(d.top,b)+" "+a(d.right,b)+" "+a(d.bottom,b)+" "+a(d.left,b)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){if(a=="float"){a=Ext.supports.Float?"cssFloat":"styleFloat"}return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},getDocumentHeight:function(){return Math.max(!Ext.isStrict?document.body.scrollHeight:document.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return Math.max(!Ext.isStrict?document.body.scrollWidth:document.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return window.innerHeight},getViewportWidth:function(){return window.innerWidth},getViewSize:function(){return{width:window.innerWidth,height:window.innerHeight}},getOrientation:function(){if(Ext.supports.OrientationChange){return(window.orientation==0)?"portrait":"landscape"}return(window.innerHeight>window.innerWidth)?"portrait":"landscape"},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});(function(){var g=document,a=Ext.dom.AbstractElement,e=null,d=g.compatMode=="CSS1Compat",c,b=function(i){if(!c){c=new a.Fly()}c.attach(i);return c};if(!("activeElement" in g)&&g.addEventListener){g.addEventListener("focus",function(i){if(i&&i.target){e=(i.target==g)?null:i.target}},true)}function h(j,k,i){return function(){j.selectionStart=k;j.selectionEnd=i}}a.addInheritableStatics({getActiveElement:function(){return g.activeElement||e},getRightMarginFixCleaner:function(n){var k=Ext.supports,l=k.DisplayChangeInputSelectionBug,m=k.DisplayChangeTextAreaSelectionBug;if(l||m){var o=g.activeElement||e,i=o&&o.tagName,p,j;if((m&&i=="TEXTAREA")||(l&&i=="INPUT"&&o.type=="text")){if(Ext.dom.Element.isAncestor(n,o)){p=o.selectionStart;j=o.selectionEnd;if(Ext.isNumber(p)&&Ext.isNumber(j)){return h(o,p,j)}}}}return Ext.emptyFn},getViewWidth:function(i){return i?Ext.dom.Element.getDocumentWidth():Ext.dom.Element.getViewportWidth()},getViewHeight:function(i){return i?Ext.dom.Element.getDocumentHeight():Ext.dom.Element.getViewportHeight()},getDocumentHeight:function(){return Math.max(!d?g.body.scrollHeight:g.documentElement.scrollHeight,Ext.dom.Element.getViewportHeight())},getDocumentWidth:function(){return Math.max(!d?g.body.scrollWidth:g.documentElement.scrollWidth,Ext.dom.Element.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?g.documentElement.clientHeight:g.body.clientHeight):self.innerHeight},getViewportWidth:function(){return(!Ext.isStrict&&!Ext.isOpera)?g.body.clientWidth:Ext.isIE?g.documentElement.clientWidth:self.innerWidth},getY:function(i){return Ext.dom.Element.getXY(i)[1]},getX:function(i){return Ext.dom.Element.getXY(i)[0]},getXY:function(k){var j,q,s,v,l,m,u=0,r=0,t,i,n=(g.body||g.documentElement),o=[0,0];k=Ext.getDom(k);if(k!=n){i=b(k).isStyle("position","absolute");if(k.getBoundingClientRect){s=k.getBoundingClientRect();t=b(document).getScroll();o=[Math.round(s.left+t.left),Math.round(s.top+t.top)]}else{j=k;while(j){q=b(j);u+=j.offsetLeft;r+=j.offsetTop;i=i||q.isStyle("position","absolute");if(Ext.isGecko){r+=v=parseInt(q.getStyle("borderTopWidth"),10)||0;u+=l=parseInt(q.getStyle("borderLeftWidth"),10)||0;if(j!=k&&!q.isStyle("overflow","visible")){u+=l;r+=v}}j=j.offsetParent}if(Ext.isSafari&&i){u-=n.offsetLeft;r-=n.offsetTop}if(Ext.isGecko&&!i){m=b(n);u+=parseInt(m.getStyle("borderLeftWidth"),10)||0;r+=parseInt(m.getStyle("borderTopWidth"),10)||0}j=k.parentNode;while(j&&j!=n){if(!Ext.isOpera||(j.tagName!="TR"&&!b(j).isStyle("display","inline"))){u-=j.scrollLeft;r-=j.scrollTop}j=j.parentNode}o=[u,r]}}return o},setXY:function(j,k){(j=Ext.fly(j,"_setXY")).position();var l=j.translatePoints(k),i=j.dom.style,m;for(m in l){if(!isNaN(l[m])){i[m]=l[m]+"px"}}},setX:function(j,i){Ext.dom.Element.setXY(j,[i,false])},setY:function(i,j){Ext.dom.Element.setXY(i,[false,j])},serializeForm:function(o){var n=o.elements||(document.forms[o]||Ext.getDom(o)).elements,i=false,m=encodeURIComponent,j,p="",l,k;Ext.each(n,function(q){j=q.name;l=q.type;if(!q.disabled&&j){if(/select-(one|multiple)/i.test(l)){Ext.each(q.options,function(r){if(r.selected){k=r.hasAttribute?r.hasAttribute("value"):r.getAttributeNode("value").specified;p+=Ext.String.format("{0}={1}&",m(j),m(k?r.value:r.text))}})}else{if(!(/file|undefined|reset|button/i.test(l))){if(!(/radio|checkbox/i.test(l)&&!q.checked)&&!(l=="submit"&&i)){p+=m(j)+"="+m(q.value)+"&";i=/submit/i.test(l)}}}}});return p.substr(0,p.length-1)}})})();Ext.dom.AbstractElement.override({getAnchorXY:function(g,k,n){g=(g||"tl").toLowerCase();n=n||{};var j=this,a=j.dom==document.body||j.dom==document,b=n.width||a?window.innerWidth:j.getWidth(),l=n.height||a?window.innerHeight:j.getHeight(),m,c=Math.round,d=j.getXY(),i=a?0:!k?d[0]:0,h=a?0:!k?d[1]:0,e={c:[c(b*0.5),c(l*0.5)],t:[c(b*0.5),0],l:[0,c(l*0.5)],r:[b,c(l*0.5)],b:[c(b*0.5),l],tl:[0,0],bl:[0,l],br:[b,l],tr:[b,0]};m=e[g];return[m[0]+i,m[1]+h]},alignToRe:/^([a-z]+)-([a-z]+)(\?)?$/,getAlignToXY:function(e,z,i,s){s=!!s;e=Ext.get(e);i=i||[0,0];if(!z||z=="?"){z="tl-bl?"}else{if(!(/-/).test(z)&&z!==""){z="tl-"+z}}z=z.toLowerCase();var v=this,d=z.match(this.alignToRe),n=window.innerWidth,u=window.innerHeight,c="",b="",A,w,m,l,q,o,g,a,k,j,r,p,h,t;if(!d){throw"Element.alignTo with an invalid alignment "+z}c=d[1];b=d[2];t=!!d[3];A=v.getAnchorXY(c,true);w=e.getAnchorXY(b,s);m=w[0]-A[0]+i[0];l=w[1]-A[1]+i[1];if(t){r=v.getWidth();p=v.getHeight();h=e.getPageBox();a=c.charAt(0);g=c.charAt(c.length-1);j=b.charAt(0);k=b.charAt(b.length-1);o=((a=="t"&&j=="b")||(a=="b"&&j=="t"));q=((g=="r"&&k=="l")||(g=="l"&&k=="r"));if(m+r>n){m=q?h.left-r:n-r}if(m<0){m=q?h.right:0}if(l+p>u){l=o?h.top-p:u-p}if(l<0){l=o?h.bottom:0}}return[m,l]},getAnchor:function(){var b=this.dom;if(!b){return}var a=this.self.data.call(this.self,b,"_anchor");if(!a){a=this.self.data.call(this.self,b,"_anchor",{})}return a},adjustForConstraints:function(c,b){var a=this.getConstrainVector(b,c);if(a){c[0]+=a[0];c[1]+=a[1]}return c}});Ext.dom.AbstractElement.addMethods({appendChild:function(a){return Ext.get(a).appendTo(this)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b,a){b=b||{};if(b.nodeType||b.dom||typeof b=="string"){b=Ext.getDom(b);this.dom.insertBefore(b,this.dom.firstChild);return !a?Ext.get(b):b}else{return this.createChild(b,this.dom.firstChild,a)}},insertSibling:function(e,c,d){var g=this,b,a=(c||"before").toLowerCase()=="after",h;if(Ext.isArray(e)){h=g;Ext.each(e,function(i){b=Ext.fly(h,"_internal").insertSibling(i,c,d);if(a){h=b}});return b}e=e||{};if(e.nodeType||e.dom){b=g.dom.parentNode.insertBefore(Ext.getDom(e),a?g.dom.nextSibling:g.dom);if(!d){b=Ext.get(b)}}else{if(a&&!g.dom.nextSibling){b=Ext.core.DomHelper.append(g.dom.parentNode,e,!d)}else{b=Ext.core.DomHelper[a?"insertAfter":"insertBefore"](g.dom,e,!d)}}return b},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.AbstractElement.addToCache(b.isFlyweight?new Ext.dom.AbstractElement(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(a,b){var e=Ext.core.DomHelper.insertBefore(this.dom,a||{tag:"div"},!b),c=e.dom||e;c.appendChild(this.dom);return e},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});(function(){var a=Ext.dom.AbstractElement;a.override({getX:function(b){return this.getXY(b)[0]},getY:function(b){return this.getXY(b)[1]},getXY:function(){var b=window.webkitConvertPointFromNodeToPage(this.dom,new WebKitPoint(0,0));return[b.x,b.y]},getOffsetsTo:function(b){var d=this.getXY(),c=Ext.fly(b,"_internal").getXY();return[d[0]-c[0],d[1]-c[1]]},setX:function(b){return this.setXY([b,this.getY()])},setY:function(b){return this.setXY([this.getX(),b])},setLeft:function(b){this.setStyle("left",a.addUnits(b));return this},setTop:function(b){this.setStyle("top",a.addUnits(b));return this},setRight:function(b){this.setStyle("right",a.addUnits(b));return this},setBottom:function(b){this.setStyle("bottom",a.addUnits(b));return this},setXY:function(e){var c=this;if(arguments.length>1){e=[e,arguments[1]]}var d=c.translatePoints(e),b=c.dom.style;for(e in d){if(!d.hasOwnProperty(e)){continue}if(!isNaN(d[e])){b[e]=d[e]+"px"}}return c},getLeft:function(b){return parseInt(this.getStyle("left"),10)||0},getRight:function(b){return parseInt(this.getStyle("right"),10)||0},getTop:function(b){return parseInt(this.getStyle("top"),10)||0},getBottom:function(b){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(b,i){i=isNaN(b[1])?i:b[1];b=isNaN(b[0])?b:b[0];var e=this,g=e.isStyle("position","relative"),h=e.getXY(),c=parseInt(e.getStyle("left"),10),d=parseInt(e.getStyle("top"),10);c=!isNaN(c)?c:(g?0:e.dom.offsetLeft);d=!isNaN(d)?d:(g?0:e.dom.offsetTop);return{left:(b-h[0]+c),top:(i-h[1]+d)}},setBox:function(e){var d=this,c=e.width,b=e.height,h=e.top,g=e.left;if(g!==undefined){d.setLeft(g)}if(h!==undefined){d.setTop(h)}if(c!==undefined){d.setWidth(c)}if(b!==undefined){d.setHeight(b)}return this},getBox:function(i,m){var j=this,g=j.dom,d=g.offsetWidth,n=g.offsetHeight,p,h,e,c,o,k;if(!m){p=j.getXY()}else{if(i){p=[0,0]}else{p=[parseInt(j.getStyle("left"),10)||0,parseInt(j.getStyle("top"),10)||0]}}if(!i){h={x:p[0],y:p[1],0:p[0],1:p[1],width:d,height:n}}else{e=j.getBorderWidth.call(j,"l")+j.getPadding.call(j,"l");c=j.getBorderWidth.call(j,"r")+j.getPadding.call(j,"r");o=j.getBorderWidth.call(j,"t")+j.getPadding.call(j,"t");k=j.getBorderWidth.call(j,"b")+j.getPadding.call(j,"b");h={x:p[0]+e,y:p[1]+o,0:p[0]+e,1:p[1]+o,width:d-(e+c),height:n-(o+k)}}h.left=h.x;h.top=h.y;h.right=h.x+h.width;h.bottom=h.y+h.height;return h},getPageBox:function(g){var j=this,d=j.dom,m=d.offsetWidth,i=d.offsetHeight,o=j.getXY(),n=o[1],c=o[0]+m,k=o[1]+i,e=o[0];if(!d){return new Ext.util.Region()}if(g){return new Ext.util.Region(n,c,k,e)}else{return{left:e,top:n,width:m,height:i,right:c,bottom:k}}}})})();(function(){var q=Ext.dom.AbstractElement,o=document.defaultView,n=/^\s+|\s+$/g,b=/\w/g,p=/\s+/,t=/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,h=Ext.supports.ClassList,e="padding",d="margin",s="border",k="-left",r="-right",m="-top",c="-bottom",i="-width",l=Ext.supports.TransparentColor,j={l:s+k+i,r:s+r+i,t:s+m+i,b:s+c+i},g={l:e+k,r:e+r,t:e+m,b:e+c},a={l:d+k,r:d+r,t:d+m,b:d+c};q.override({styleHooks:{},addStyles:function(B,A){var v=0,z=B.match(b),y=0,u=z.length,x,w;for(;y<u;y++){x=z[y];w=x&&parseInt(this.getStyle(A[x]),10);if(w){v+=Math.abs(w)}}return v},addCls:h?function(x){var z=this,B=z.dom,A,y,w,u,v;if(typeof(x)=="string"){x=x.replace(n,"").split(p)}if(B&&x&&!!(u=x.length)){if(!B.className){B.className=x.join(" ")}else{A=B.classList;for(w=0;w<u;++w){v=x[w];if(v){if(!A.contains(v)){if(y){y.push(v)}else{y=B.className.replace(n,"");y=y?[y,v]:[v]}}}}if(y){B.className=y.join(" ")}}}return z}:function(v){var w=this,y=w.dom,x,u;if(y&&v&&v.length){u=Ext.Element.mergeClsList(y.className,v);if(u.changed){y.className=u.join(" ")}}return w},removeCls:function(w){var x=this,y=x.dom,u,v;if(typeof(w)=="string"){w=w.replace(n,"").split(p)}if(y&&y.className&&w&&!!(u=w.length)){if(u==1&&h){if(w[0]){y.classList.remove(w[0])}}else{v=Ext.Element.removeCls(y.className,w);if(v.changed){y.className=v.join(" ")}}}return x},radioCls:function(y){var z=this.dom.parentNode.childNodes,w;y=Ext.isArray(y)?y:[y];for(var x=0,u=z.length;x<u;x++){w=z[x];if(w&&w.nodeType==1){Ext.fly(w,"_internal").removeCls(y)}}return this.addCls(y)},toggleCls:h?function(u){var v=this,w=v.dom;if(w){u=u.replace(n,"");if(u){w.classList.toggle(u)}}return v}:function(u){var v=this;return v.hasCls(u)?v.removeCls(u):v.addCls(u)},hasCls:h?function(u){var v=this.dom;return(v&&u)?v.classList.contains(u):false}:function(u){var v=this.dom;return v?u&&(" "+v.className+" ").indexOf(" "+u+" ")!=-1:false},replaceCls:function(v,u){return this.removeCls(v).addCls(u)},isStyle:function(u,v){return this.getStyle(u)==v},getStyle:function(z){var w=this,y=w.dom,x=w.styleHooks[z],v,u;if(y==document){return null}if(!x){w.styleHooks[z]=x={name:q.normalize(z)}}if(x.get){return x.get(y,w)}v=o.getComputedStyle(y,"");u=(v&&v[x.name]);if(!l&&u=="rgba(0, 0, 0, 0)"){u="transparent"}return u},isTransparent:function(v){var u=this.getStyle(v);return u?t.test(u):false},setStyle:function(B,z){var x=this,A=x.dom,u=x.styleHooks,w=A.style,v=B,y;if(typeof v=="string"){y=u[v];if(!y){u[v]=y={name:q.normalize(v)}}z=(z==null)?"":z;if(y.set){y.set(A,z,x)}else{w[y.name]=z}}else{for(v in B){if(B.hasOwnProperty(v)){y=u[v];if(!y){u[v]=y={name:q.normalize(v)}}z=B[v];z=(z==null)?"":z;if(y.set){y.set(A,z,x)}else{w[y.name]=z}}}}return x},getHeight:function(v){var w=this.dom,u=v?(w.clientHeight-this.getPadding("tb")):w.offsetHeight;return u>0?u:0},getWidth:function(u){var w=this.dom,v=u?(w.clientWidth-this.getPadding("lr")):w.offsetWidth;return v>0?v:0},setWidth:function(u){var v=this;v.dom.style.width=q.addUnits(u);return v},setHeight:function(u){var v=this;v.dom.style.height=q.addUnits(u);return v},getBorderWidth:function(u){return this.addStyles(u,j)},getPadding:function(u){return this.addStyles(u,g)},margins:a,applyStyles:function(w){if(w){var v,u,x=this.dom;if(typeof w=="function"){w=w.call()}if(typeof w=="string"){w=Ext.util.Format.trim(w).split(/\s*(?::|;)\s*/);for(v=0,u=w.length;v<u;){x.style[q.normalize(w[v++])]=w[v++]}}else{if(typeof w=="object"){this.setStyle(w)}}}},setSize:function(w,u){var x=this,v=x.dom.style;if(Ext.isObject(w)){u=w.height;w=w.width}v.width=q.addUnits(w);v.height=q.addUnits(u);return x},getViewSize:function(){var u=document,v=this.dom;if(v==u||v==u.body){return{width:q.getViewportWidth(),height:q.getViewportHeight()}}else{return{width:v.clientWidth,height:v.clientHeight}}},getSize:function(v){var u=this.dom;return{width:Math.max(0,v?(u.clientWidth-this.getPadding("lr")):u.offsetWidth),height:Math.max(0,v?(u.clientHeight-this.getPadding("tb")):u.offsetHeight)}},repaint:function(){var u=this.dom;this.addCls(Ext.baseCSSPrefix+"repaint");setTimeout(function(){Ext.fly(u).removeCls(Ext.baseCSSPrefix+"repaint")},1);return this},getMargin:function(v){var w=this,x={t:"top",l:"left",r:"right",b:"bottom"},y={},u;if(!v){for(u in w.margins){y[x[u]]=parseFloat(w.getStyle(w.margins[u]))||0}return y}else{return w.addStyles.call(w,v,w.margins)}},mask:function(v,y,B){var z=this,w=z.dom,u=Ext.Element.data(w,"mask"),D,C,A="",x=Ext.baseCSSPrefix;z.addCls(x+"masked");if(z.getStyle("position")=="static"){z.addCls(x+"masked-relative")}if(u){u.remove()}if(Ext.isString(y)&&!Ext.isEmpty(y)){A=" "+y}else{if(y){A=" "+x+"mask-gray"}}D=z.createChild({cls:x+"mask"+((B!==false)?"":(" "+x+"mask-gray")),html:v?('<div class="'+(y||(x+"mask-message"))+'">'+v+"</div>"):""});C=z.getSize();Ext.Element.data(w,"mask",D);if(w===document.body){C.height=window.innerHeight;if(z.orientationHandler){Ext.EventManager.unOrientationChange(z.orientationHandler,z)}z.orientationHandler=function(){C=z.getSize();C.height=window.innerHeight;D.setSize(C)};Ext.EventManager.onOrientationChange(z.orientationHandler,z)}D.setSize(C);if(Ext.is.iPad){Ext.repaint()}},unmask:function(){var v=this,x=v.dom,u=Ext.Element.data(x,"mask"),w=Ext.baseCSSPrefix;if(u){u.remove();Ext.Element.data(x,"mask",undefined)}v.removeCls([w+"masked",w+"masked-relative"]);if(x===document.body){Ext.EventManager.unOrientationChange(v.orientationHandler,v);delete v.orientationHandler}}});q.populateStyleMap=function(B,u){var A=["margin-","padding-","border-width-"],z=["before","after"],w,y,v,x;for(w=A.length;w--;){for(x=2;x--;){y=A[w]+z[x];B[q.normalize(y)]=B[y]={name:q.normalize(A[w]+u[x])}}}}})();Ext.onReady(function(){var b=document.defaultView,d=Ext.dom.AbstractElement,a=Ext.supports;function g(l){var j=b.getComputedStyle(l,""),h=j?j.marginRight:null,i,k;if(h!="0px"){i=l.style;k=i.display;i.display="inline-block";h=b.getComputedStyle(l,null).marginRight;i.display=k}return h}function c(m){var k=b.getComputedStyle(m,""),h=k?k.marginRight:null,j,i,l;if(h!="0px"){j=m.style;i=d.getRightMarginFixCleaner(m);l=j.display;j.display="inline-block";h=b.getComputedStyle(m,"").marginRight;j.display=l;i()}return h}var e=d.prototype.styleHooks;d.populateStyleMap(e,["left","right"]);if(a.init){a.init()}if(!a.RightMargin){e["margin-right"]=e.marginRight={name:"marginRight",get:(a.DisplayChangeInputSelectionBug||a.DisplayChangeTextAreaSelectionBug)?c:g}}});Ext.dom.AbstractElement.override({findParent:function(h,b,a){var e=this.dom,c=document.documentElement,g=0,d;b=b||50;if(isNaN(b)){d=Ext.getDom(b);b=Number.MAX_VALUE}while(e&&e.nodeType==1&&g<b&&e!=c&&e!=d){if(Ext.DomQuery.is(e,h)){return a?Ext.get(e):e}g++;e=e.parentNode}return null},findParentNode:function(d,b,a){var c=Ext.fly(this.dom.parentNode,"_internal");return c?c.findParent(d,b,a):null},up:function(b,a){return this.findParentNode(b,a,true)},select:function(a,b){return Ext.dom.Element.select(a,this.dom,b)},query:function(a){return Ext.DomQuery.select(a,this.dom)},down:function(a,b){var c=Ext.DomQuery.selectNode(a,this.dom);return b?c:Ext.get(c)},child:function(a,b){var d,c=this,e;e=Ext.get(c).id;e=e.replace(/[\.:]/g,"\\$0");d=Ext.DomQuery.selectNode("#"+e+" > "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});(function(){var b="afterbegin",g="afterend",a="beforebegin",k="beforeend",i="<table>",e="</table>",c=i+"<tbody>",j="</tbody>"+e,h=c+"<tr>",d="</tr>"+j;Ext.define("Ext.dom.Helper",{extend:"Ext.dom.AbstractHelper",tempTableEl:null,tableRe:/^table|tbody|tr|td$/i,tableElRe:/td|tr|tbody/i,useDom:false,createDom:function(m,t){var n,w=document,r,u,p,v;if(Ext.isArray(m)){n=w.createDocumentFragment();for(var s=0,q=m.length;s<q;s++){this.createDom(m[s],n)}}else{if(typeof m=="string"){n=w.createTextNode(m)}else{n=w.createElement(m.tag||"div");r=!!n.setAttribute;for(u in m){if(!this.confRe.test(u)){p=m[u];if(u=="cls"){n.className=p}else{if(r){n.setAttribute(u,p)}else{n[u]=p}}}}Ext.DomHelper.applyStyles(n,m.style);if((v=m.children||m.cn)){this.createDom(v,n)}else{if(m.html){n.innerHTML=m.html}}}}if(t){t.appendChild(n)}return n},ieTable:function(t,p,o,q){this.tempTableEl.innerHTML=[p,o,q].join("");var l=-1,n=this.tempTableEl,m;while(++l<t){n=n.firstChild}m=n.nextSibling;if(m){var r=document.createDocumentFragment();while(n){m=n.nextSibling;r.appendChild(n);n=m}n=r}return n},insertIntoTable:function(l,m,o,n){var p,q;this.tempTableEl=this.tempTableEl||document.createElement("div");if(l=="td"&&(m==b||m==k)||!this.tableElRe.test(l)&&(m==a||m==g)){return null}q=m==a?o:m==g?o.nextSibling:m==b?o.firstChild:null;if(m==a||m==g){o=o.parentNode}if(l=="td"||(l=="tr"&&(m==k||m==b))){p=this.ieTable(4,h,n,d)}else{if((l=="tbody"&&(m==k||m==b))||(l=="tr"&&(m==a||m==g))){p=this.ieTable(3,c,n,j)}else{p=this.ieTable(2,i,n,e)}}o.insertBefore(p,q);return p},createContextualFragment:function(n){var q=document.createElement("div"),l=document.createDocumentFragment(),m=0,o,p;q.innerHTML=n;p=q.childNodes;o=p.length;for(;m<o;m++){l.appendChild(p[m].cloneNode(true))}return l},applyStyles:function(l,m){if(m){l=Ext.fly(l);if(typeof m=="function"){m=m.call()}if(typeof m=="string"){m=Ext.dom.Element.parseStyles(m)}if(typeof m=="object"){l.setStyle(m)}}},createHtml:function(l){return this.markup(l)},doInsert:function(p,r,q,s,n,l){p=p.dom||Ext.getDom(p);var m;if(this.useDom){m=this.createDom(r,null);if(l){p.appendChild(m)}else{(n=="firstChild"?p:p.parentNode).insertBefore(m,p[n]||p)}}else{m=this.insertHtml(s,p,this.markup(r))}return q?Ext.get(m,true):m},insertHtml:function(q,l,r){var o={},n,s,p,t,u,m;q=q.toLowerCase();o[a]=["BeforeBegin","previousSibling"];o[g]=["AfterEnd","nextSibling"];if(l.insertAdjacentHTML){if(this.tableRe.test(l.tagName)&&(m=this.insertIntoTable(l.tagName.toLowerCase(),q,l,r))){return m}o[b]=["AfterBegin","firstChild"];o[k]=["BeforeEnd","lastChild"];if((n=o[q])){l.insertAdjacentHTML(n[0],r);return l[n[1]]}}else{if(Ext.isTextNode(l)){q=q==="afterbegin"?"beforebegin":q;q=q==="beforeend"?"afterend":q}s=Ext.supports.CreateContextualFragment?l.ownerDocument.createRange():undefined;t="setStart"+(this.endRe.test(q)?"After":"Before");if(o[q]){if(s){s[t](l);u=s.createContextualFragment(r)}else{u=this.createContextualFragment(r)}l.parentNode.insertBefore(u,q==a?l:l.nextSibling);return l[(q==a?"previous":"next")+"Sibling"]}else{p=(q==b?"first":"last")+"Child";if(l.firstChild){if(s){s[t](l[p]);u=s.createContextualFragment(r)}else{u=this.createContextualFragment(r)}if(q==b){l.insertBefore(u,l.firstChild)}else{l.appendChild(u)}}else{l.innerHTML=r}return l[p]}}},createTemplate:function(m){var l=this.markup(m);return new Ext.Template(l)}},function(){Ext.ns("Ext.core");Ext.DomHelper=Ext.core.DomHelper=new this})})();Ext.ns("Ext.core");Ext.dom.Query=Ext.core.DomQuery=Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,startIdRe=/^\s*\#/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var result=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){result[++ri]=ci}}return result}function byId(cs,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var result=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){result[++ri]=ci;return result}}return result}function byAttribute(cs,attr,value,op,custom){var result=[],ri=-1,useGetStyle=custom=="{",fn=Ext.DomQuery.operators[op],a,xml,hasXml;for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}if(!hasXml){xml=Ext.DomQuery.isXml(ci);hasXml=true}if(!xml){if(useGetStyle){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}}else{a=ci.getAttribute(attr)}if((fn&&fn(a,value))||(!fn&&a)){result[++ri]=ci}}return result}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&typeof c1[0].selectSingleNode!="undefined"){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],mode,lastPath,matchers=Ext.DomQuery.matchers,matchersLn=matchers.length,modeMatch,lmode=path.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';path=path.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(path&&lastPath!=path){lastPath=path;var tokenMatch=path.match(tagTokenRe);if(type=="select"){if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}else{if(path.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tokenMatch){if(tokenMatch[1]=="#"){fn[fn.length]='n = byId(n, "'+tokenMatch[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tokenMatch[2]+'");'}path=path.replace(tokenMatch[0],"")}}while(!(modeMatch=path.match(modeRe))){var matched=false;for(var j=0;j<matchersLn;j++){var t=matchers[j];var m=path.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});path=path.replace(m[0],"");matched=true;break}}if(!matched){}}if(modeMatch[1]){fn[fn.length]='mode="'+modeMatch[1].replace(trimRe,"")+'";';path=path.replace(modeMatch[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},jsSelect:function(path,root,type){root=root||document;if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var subPath=paths[i].replace(trimRe,"");if(!cache[subPath]){cache[subPath]=Ext.DomQuery.compile(subPath);if(!cache[subPath]){}}var result=cache[subPath](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{if(root.parentNode&&(root.nodeType!==9)&&path.indexOf(",")===-1&&!startIdRe.test(path)){path="#"+Ext.id(root)+" "+path;root=root.parentNode}return Ext.Array.toArray(root.querySelectorAll(path))}catch(e){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;(function(){var HIDDEN="hidden",DOC=document,VISIBILITY="visibility",DISPLAY="display",NONE="none",XMASKED=Ext.baseCSSPrefix+"masked",XMASKEDRELATIVE=Ext.baseCSSPrefix+"masked-relative",EXTELMASKMSG=Ext.baseCSSPrefix+"mask-msg",bodyRe=/^body/i,noBoxAdjust=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1},Element=Ext.define("Ext.dom.Element",{extend:"Ext.dom.AbstractElement",alternateClassName:["Ext.Element","Ext.core.Element"],addUnits:function(){return this.self.addUnits.apply(this.self,arguments)},focus:function(defer,dom){var me=this,scrollTop;dom=dom||me.dom;try{if(Number(defer)){Ext.defer(me.focus,defer,null,[null,dom])}else{if(dom.offsetHeight>Element.getViewHeight()){scrollTop=DOC.body.scrollTop}dom.focus();if(scrollTop!==undefined){DOC.body.scrollTop=scrollTop}}}catch(e){}return me},blur:function(){try{this.dom.blur()}catch(e){}return this},isBorderBox:function(){return Ext.isBorderBox||noBoxAdjust[(this.dom.tagName||"").toLowerCase()]},hover:function(overFn,outFn,scope,options){var me=this;me.on("mouseenter",overFn,scope||me.dom,options);me.on("mouseleave",outFn,scope||me.dom,options);return me},getAttributeNS:function(ns,name){return this.getAttribute(name,ns)},getAttribute:(Ext.isIE&&!(Ext.isIE9&&DOC.documentMode===9))?function(name,ns){var d=this.dom,type;if(ns){type=typeof d[ns+":"+name];if(type!="undefined"&&type!="unknown"){return d[ns+":"+name]||null}return null}if(name==="for"){name="htmlFor"}return d[name]||null}:function(name,ns){var d=this.dom;if(ns){return d.getAttributeNS(ns,name)||d.getAttribute(ns+":"+name)}return d.getAttribute(name)||d[name]||null},autoBoxAdjust:true,isVisible:function(deep){var vis=!this.isStyle(VISIBILITY,HIDDEN)&&!this.isStyle(DISPLAY,NONE),p=this.dom.parentNode;if(deep!==true||!vis){return vis}while(p&&!(bodyRe.test(p.tagName))){if(!Ext.fly(p,"_isVisible").isVisible()){return false}p=p.parentNode}return true},isDisplayed:function(){return !this.isStyle(DISPLAY,NONE)},enableDisplayMode:function(display){this.setVisibilityMode(Element.DISPLAY);if(!Ext.isEmpty(display)){Element.data(this.dom,"originalDisplay",display)}return this},mask:function(msg,msgCls,elHeight){var me=this,dom=me.dom,setExpression=dom.style.setExpression,dh=Ext.DomHelper,mask=me.maskEl,mm;if(!(bodyRe.test(dom.tagName)&&me.getStyle("position")=="static")){me.addCls(XMASKEDRELATIVE)}msgCls=msgCls?EXTELMASKMSG+" "+msgCls:EXTELMASKMSG;if(mask){mm=me.maskMsgEl;mm.dom.className=msgCls;mm.dom.firstChild.innerHTML=msg}else{dh.append(dom,[{cls:Ext.baseCSSPrefix+"mask"},{cls:msgCls,cn:{tag:"div",html:msg||""}}]);mm=me.maskMsgEl=Ext.get(dom.lastChild);mask=me.maskEl=Ext.get(mm.dom.previousSibling)}me.addCls(XMASKED);mask.setDisplayed(true);if(typeof msg=="string"){mm.setDisplayed(true);mm.center(me)}else{mm.setDisplayed(false)}if(!Ext.supports.IncludePaddingInWidthCalculation&&setExpression){mask.dom.style.setExpression("width",'this.parentNode.clientWidth + "px"')}if(!Ext.supports.IncludePaddingInHeightCalculation&&setExpression){mask.dom.style.setExpression("height","this.parentNode."+(dom==DOC.body?"scrollHeight":"offsetHeight")+' + "px"')}else{if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&me.getStyle("height")=="auto"){mask.setSize(undefined,elHeight||me.getHeight())}}return mask},unmask:function(){var me=this,mask=me.maskEl;if(mask){if(mask.dom.style.clearExpression){mask.dom.style.clearExpression("width");mask.dom.style.clearExpression("height")}mask.setDisplayed(false);me.maskMsgEl.setDisplayed(false);me.removeCls([XMASKED,XMASKEDRELATIVE])}},isMasked:function(){var me=this,mask=Element.data(me.dom,"mask"),maskMsg=Element.data(me.dom,"maskMsg");if(mask&&mask.isVisible()){if(maskMsg){maskMsg.center(me)}return true}return false},createShim:function(){var el=DOC.createElement("iframe"),shim;el.frameBorder="0";el.className=Ext.baseCSSPrefix+"shim";el.src=Ext.SSL_SECURE_URL;shim=Ext.get(this.dom.parentNode.insertBefore(el,this.dom));shim.autoBoxAdjust=false;return shim},addKeyListener:function(key,fn,scope){var config;if(typeof key!="object"||Ext.isArray(key)){config={key:key,fn:fn,scope:scope}}else{config={key:key.key,shift:key.shift,ctrl:key.ctrl,alt:key.alt,fn:fn,scope:scope}}return new Ext.util.KeyMap(this,config)},addKeyMap:function(config){return new Ext.util.KeyMap(this,config)},on:function(eventName,fn,scope,options){Ext.EventManager.on(this,eventName,fn,scope||this,options);return this},un:function(eventName,fn,scope){Ext.EventManager.un(this,eventName,fn,scope||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this);return this}},function(){var EC=Ext.cache,El=this,AbstractElement=Ext.dom.AbstractElement,focusRe=/a|button|embed|iframe|img|input|object|select|textarea/i,nonSpaceRe=/\S/,scriptTagRe=/(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,replaceScriptTagRe=/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,useDocForId=!(Ext.isIE6||Ext.isIE7||Ext.isIE8);El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';function garbageCollect(){if(!Ext.enableGarbageCollector){clearInterval(El.collectorThreadId)}else{var eid,el,d,o;for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}o=EC[eid];if(o.skipGarbageCollection){continue}el=o.el;d=el.dom;if(!d||!d.parentNode||(!d.offsetParent&&!Ext.getElementById(eid))){if(d&&Ext.enableListenerCollection){Ext.EventManager.removeAll(d)}delete EC[eid]}}if(Ext.isIE){var t={};for(eid in EC){if(!EC.hasOwnProperty(eid)){continue}t[eid]=EC[eid]}EC=Ext.cache=t}}}El.collectorThreadId=setInterval(garbageCollect,30000);El.addMethods({monitorMouseLeave:function(delay,handler,scope){var me=this,timer,listeners={mouseleave:function(e){timer=setTimeout(Ext.Function.bind(handler,scope||me,[e]),delay)},mouseenter:function(){clearTimeout(timer)},freezeEvent:true};me.on(listeners);return listeners},swallowEvent:function(eventName,preventDefault){var me=this;function fn(e){e.stopPropagation();if(preventDefault){e.preventDefault()}}if(Ext.isArray(eventName)){Ext.each(eventName,function(e){me.on(e,fn)});return me}me.on(eventName,fn);return me},relayEvent:function(eventName,observable){this.on(eventName,function(e){observable.fireEvent(eventName,e)})},clean:function(forceReclean){var me=this,dom=me.dom,n=dom.firstChild,nx,ni=-1;if(Element.data(dom,"isCleaned")&&forceReclean!==true){return me}while(n){nx=n.nextSibling;if(n.nodeType==3){if(!(nonSpaceRe.test(n.nodeValue))){dom.removeChild(n)}else{if(nx&&nx.nodeType==3){n.appendData(Ext.String.trim(nx.data));dom.removeChild(nx);nx=n.nextSibling;n.nodeIndex=++ni}}}else{Ext.fly(n).clean();n.nodeIndex=++ni}n=nx}Element.data(dom,"isCleaned",true);return me},load:function(options){this.getLoader().load(options);return this},getLoader:function(){var dom=this.dom,loader=Element.data(dom,"loader");if(!loader){loader=new Ext.ElementLoader({target:this});Element.data(dom,"loader",loader)}return loader},update:function(html,loadScripts,callback){var me=this,id,dom,interval;if(!me.dom){return me}html=html||"";dom=me.dom;if(loadScripts!==true){dom.innerHTML=html;Ext.callback(callback,me);return me}id=Ext.id();html+='<span id="'+id+'"></span>';interval=setInterval(function(){if(!(el=DOC.getElementById(id))){return false}clearInterval(interval);Ext.removeNode(el);var hd=Ext.getHead().dom,match,attrs,srcMatch,typeMatch,el,s;while((match=scriptTagRe.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}Ext.callback(callback,me)},20);dom.innerHTML=html.replace(replaceScriptTagRe,"");return me},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(config,renderTo,matchBox){config=(typeof config=="object")?config:{tag:"div",cls:config};var me=this,proxy=renderTo?Ext.DomHelper.append(renderTo,config,true):Ext.DomHelper.insertBefore(me.dom,config,true);proxy.setVisibilityMode(Element.DISPLAY);proxy.hide();if(matchBox&&me.setBox&&me.getBox){proxy.setBox(me.getBox())}return proxy},getScopeParent:function(){var parent=this.dom.parentNode;return Ext.scopeResetCSS?parent.parentNode:parent},needsTabIndex:function(){if(this.dom){if((this.dom.nodeName==="a")&&(!this.dom.href)){return true}return !focusRe.test(this.dom.nodeName)}},focusable:function(){var dom=this.dom,nodeName=dom.nodeName,canFocus=false;if(!dom.disabled){if(focusRe.test(nodeName)){if((nodeName!=="a")||dom.href){canFocus=true}}else{canFocus=!isNaN(dom.tabIndex)}}return canFocus&&this.isVisible(true)}});if(Ext.isIE){El.prototype.getById=function(id,asDom){var dom=this.dom,cached,el,ret;if(dom){el=(useDocForId&&DOC.getElementById(id))||dom.all[id];if(el){if(asDom){ret=el}else{cached=EC[id];if(cached&&cached.el){ret=cached.el;ret.dom=el}else{ret=El.addToCache(new Element(el))}}return ret}}return asDom?Ext.getDom(id):El.get(id)}}El.createAlias({addListener:"on",removeListener:"un",clearListeners:"removeAllListeners"});El.Fly=AbstractElement.Fly=new Ext.Class({extend:El,constructor:function(dom){this.dom=dom},attach:AbstractElement.Fly.prototype.attach});if(Ext.isIE){Ext.getElementById=function(id){var el=DOC.getElementById(id),detachedBodyEl;if(!el&&(detachedBodyEl=AbstractElement.detachedBodyEl)){el=detachedBodyEl.dom.all[id]}return el}}else{if(!DOC.querySelector){Ext.getDetachedBody=Ext.getBody;Ext.getElementById=function(id){return DOC.getElementById(id)}}}})})();Ext.dom.Element.override((function(){var d=document,c=window,a=/^([a-z]+)-([a-z]+)(\?)?$/,b=Math.round;return{getAnchorXY:function(j,o,h){j=(j||"tl").toLowerCase();h=h||{};var m=this,i=m.dom==d.body||m.dom==d,e=h.width||i?Ext.dom.Element.getViewWidth():m.getWidth(),g=h.height||i?Ext.dom.Element.getViewHeight():m.getHeight(),q,n=m.getXY(),p=m.getScroll(),l=i?p.left:!o?n[0]:0,k=i?p.top:!o?n[1]:0;switch(j){case"tl":q=[0,0];break;case"bl":q=[0,g];break;case"tr":q=[e,0];break;case"c":q=[b(e*0.5),b(g*0.5)];break;case"t":q=[b(e*0.5),0];break;case"l":q=[0,b(g*0.5)];break;case"r":q=[e,b(g*0.5)];break;case"b":q=[b(e*0.5),g];break;case"br":q=[e,g]}return[q[0]+l,q[1]+k]},getAlignToXY:function(m,G,j){m=Ext.get(m);if(!m||!m.dom){}j=j||[0,0];G=(!G||G=="?"?"tl-bl?":(!(/-/).test(G)&&G!==""?"tl-"+G:G||"tl-bl")).toLowerCase();var H=this,l,w,q,o,k,z,A,E=Ext.dom.Element.getViewWidth()-10,i=Ext.dom.Element.getViewHeight()-10,g,h,n,p,u,v,F=d.documentElement,s=d.body,D=(F.scrollLeft||s.scrollLeft||0),B=(F.scrollTop||s.scrollTop||0),C,t,r,e=G.match(a);t=e[1];r=e[2];C=!!e[3];l=H.getAnchorXY(t,true);w=m.getAnchorXY(r,false);q=w[0]-l[0]+j[0];o=w[1]-l[1]+j[1];if(C){k=H.getWidth();z=H.getHeight();A=m.getRegion();g=t.charAt(0);h=t.charAt(t.length-1);n=r.charAt(0);p=r.charAt(r.length-1);u=((g=="t"&&n=="b")||(g=="b"&&n=="t"));v=((h=="r"&&p=="l")||(h=="l"&&p=="r"));if(q+k>E+D){q=v?A.left-k:E+D-k}if(q<D){q=v?A.right:D}if(o+z>i+B){o=u?A.top-z:i+B-z}if(o<B){o=u?A.bottom:B}}return[q,o]},anchorTo:function(g,l,h,e,o,p){var m=this,j=m.dom,n=!Ext.isEmpty(o),i=function(){Ext.fly(j).alignTo(g,l,h,e);Ext.callback(p,Ext.fly(j))},k=this.getAnchor();this.removeAnchor();Ext.apply(k,{fn:i,scroll:n});Ext.EventManager.onWindowResize(i,null);if(n){Ext.EventManager.on(c,"scroll",i,null,{buffer:!isNaN(o)?o:50})}i.call(m);return m},removeAnchor:function(){var g=this,e=this.getAnchor();if(e&&e.fn){Ext.EventManager.removeResizeListener(e.fn);if(e.scroll){Ext.EventManager.un(c,"scroll",e.fn)}delete e.fn}return g},getAlignVector:function(h,g,j){var i=this,e=i.getXY(),k=i.getAlignToXY(h,g,j);h=Ext.get(h);k[0]-=e[0];k[1]-=e[1];return k},alignTo:function(h,e,j,g){var i=this;return i.setXY(i.getAlignToXY(h,e,j),i.anim&&!!g?i.anim(g):false)},getConstrainVector:function(i,g){if(!(i instanceof Ext.util.Region)){i=Ext.get(i).getViewRegion()}var k=this.getRegion(),e=[0,0],j=this.shadow&&this.shadow.offset,h=false;if(g){k.translateBy(g[0]-k.x,g[1]-k.y)}if(j){i.adjust(0,-j,-j,j)}if(k.right>i.right){h=true;e[0]=(i.right-k.right)}if(k.left+e[0]<i.left){h=true;e[0]=(i.left-k.left)}if(k.bottom>i.bottom){h=true;e[1]=(i.bottom-k.bottom)}if(k.top+e[1]<i.top){h=true;e[1]=(i.top-k.top)}return h?e:false},getCenterXY:function(){return this.getAlignToXY(d,"c-c")},center:function(e){return this.alignTo(e||d,"c-c")}}})());Ext.dom.Element.override({animate:function(a){var c=this,b,d;if(!c.id){c=Ext.get(c.dom)}if(!Ext.fx.Manager.hasFxBlock(c.id)){if(a.listeners){b=a.listeners;delete a.listeners}if(a.internalListeners){a.listeners=a.internalListeners;delete a.internalListeners}d=new Ext.fx.Anim(c.anim(a));if(b){d.on(b)}Ext.fx.Manager.queueFx(d)}return c},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this,c=a.duration||Ext.fx.Anim.prototype.duration,e=a.easing||"ease",d;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));Ext.fx.Manager.setFxDefaults(b.id,{delay:0});d={target:b,remove:a.remove,alternate:a.alternate||false,duration:c,easing:e,callback:a.callback,listeners:a.listeners,iterations:a.iterations||1,scope:a.scope,block:a.block,concurrent:a.concurrent,delay:a.delay||0,paused:true,keyframes:a.keyframes,from:a.from||{},to:Ext.apply({},a)};Ext.apply(d.to,a.to);delete d.to.to;delete d.to.from;delete d.to.remove;delete d.to.alternate;delete d.to.keyframes;delete d.to.iterations;delete d.to.listeners;delete d.to.target;delete d.to.paused;delete d.to.callback;delete d.to.scope;delete d.to.duration;delete d.to.easing;delete d.to.concurrent;delete d.to.block;delete d.to.stopAnimation;delete d.to.delay;return d},slideIn:function(b,h,e){var g=this,d=g.dom.style,c,a;b=b||"t";h=h||{};c=function(){var m=this,l=h.listeners,n,i,k,o,j;if(!e){g.fixDisplay()}n=g.getBox();if((b=="t"||b=="b")&&n.height===0){n.height=g.dom.scrollHeight}else{if((b=="l"||b=="r")&&n.width===0){n.width=g.dom.scrollWidth}}i=g.getPositioning();g.setSize(n.width,n.height);j=g.wrap({id:Ext.id()+"-anim-wrap-for-"+g.id,style:{visibility:e?"visible":"hidden"}});j.setPositioning(i);if(j.isStyle("position","static")){j.position("relative")}g.clearPositioning("auto");j.clip();g.setStyle({visibility:"",position:"absolute"});if(e){j.setSize(n.width,n.height)}switch(b){case"t":o={from:{width:n.width+"px",height:"0px"},to:{width:n.width+"px",height:n.height+"px"}};d.bottom="0px";break;case"l":o={from:{width:"0px",height:n.height+"px"},to:{width:n.width+"px",height:n.height+"px"}};d.right="0px";break;case"r":o={from:{x:n.x+n.width,width:"0px",height:n.height+"px"},to:{x:n.x,width:n.width+"px",height:n.height+"px"}};break;case"b":o={from:{y:n.y+n.height,width:n.width+"px",height:"0px"},to:{y:n.y,width:n.width+"px",height:n.height+"px"}};break;case"tl":o={from:{x:n.x,y:n.y,width:"0px",height:"0px"},to:{width:n.width+"px",height:n.height+"px"}};d.bottom="0px";d.right="0px";break;case"bl":o={from:{x:n.x+n.width,width:"0px",height:"0px"},to:{x:n.x,width:n.width+"px",height:n.height+"px"}};d.right="0px";break;case"br":o={from:{x:n.x+n.width,y:n.y+n.height,width:"0px",height:"0px"},to:{x:n.x,y:n.y,width:n.width+"px",height:n.height+"px"}};break;case"tr":o={from:{y:n.y+n.height,width:"0px",height:"0px"},to:{y:n.y,width:n.width+"px",height:n.height+"px"}};d.bottom="0px";break}j.show();a=Ext.apply({},h);delete a.listeners;a=new Ext.fx.Anim(Ext.applyIf(a,{target:j,duration:500,easing:"ease-out",from:e?o.to:o.from,to:e?o.from:o.to}));a.on("afteranimate",function(){if(e){g.setPositioning(i);if(h.useDisplay){g.setDisplayed(false)}else{g.hide()}}else{g.clearPositioning();g.setPositioning(i)}if(j.dom){j.dom.parentNode.insertBefore(g.dom,j.dom);j.remove()}g.setSize(n.width,n.height);m.end()});if(l){a.on(l)}};g.animate({duration:h.duration?Math.max(h.duration,500)*2:1000,listeners:{beforeanimate:c,afteranimate:function(){if(a&&a.running){a.end()}}}});return g},slideOut:function(a,b){return this.slideIn(a,b,true)},puff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-out",duration:500,useDisplay:false});a=function(){b.clearOpacity();b.show();var e=b.getBox(),g=b.getStyle("fontSize"),d=b.getPositioning();this.to={width:e.width*2,height:e.height*2,x:e.x-(e.width/2),y:e.y-(e.height/2),opacity:0,fontSize:"200%"};this.on("afteranimate",function(){if(b.dom){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setStyle({fontSize:g})}})};b.animate({duration:c.duration,easing:c.easing,listeners:{beforeanimate:{fn:a}}});return b},switchOff:function(c){var b=this,a;c=Ext.applyIf(c||{},{easing:"ease-in",duration:500,remove:false,useDisplay:false});a=function(){var h=this,g=b.getSize(),i=b.getXY(),e,d;b.clearOpacity();b.clip();d=b.getPositioning();e=new Ext.fx.Animator({target:b,duration:c.duration,easing:c.easing,keyframes:{33:{opacity:0.3},66:{height:1,y:i[1]+g.height/2},100:{width:1,x:i[0]+g.width/2}}});e.on("afteranimate",function(){if(c.useDisplay){b.setDisplayed(false)}else{b.hide()}b.clearOpacity();b.setPositioning(d);b.setSize(g);h.end()})};b.animate({duration:(Math.max(c.duration,500)*2),listeners:{beforeanimate:{fn:a}}});return b},frame:function(a,d,e){var c=this,b;a=a||"#C3DAF9";d=d||1;e=e||{};b=function(){c.show();var i=this,j=c.getBox(),h=Ext.getBody().createChild({id:c.id+"-anim-proxy",style:{position:"absolute","pointer-events":"none","z-index":35000,border:"0px solid "+a}}),g;g=new Ext.fx.Anim({target:h,duration:e.duration||1000,iterations:d,from:{top:j.y,left:j.x,borderWidth:0,opacity:1,height:j.height,width:j.width},to:{top:j.y-20,left:j.x-20,borderWidth:10,opacity:0,height:j.height+40,width:j.width+40}});g.on("afteranimate",function(){h.remove();i.end()})};c.animate({duration:(Math.max(e.duration,500)*2)||2000,listeners:{beforeanimate:{fn:b}}});return c},ghost:function(a,d){var c=this,b;a=a||"b";b=function(){var h=c.getWidth(),g=c.getHeight(),i=c.getXY(),e=c.getPositioning(),j={opacity:0};switch(a){case"t":j.y=i[1]-g;break;case"l":j.x=i[0]-h;break;case"r":j.x=i[0]+h;break;case"b":j.y=i[1]+g;break;case"tl":j.x=i[0]-h;j.y=i[1]-g;break;case"bl":j.x=i[0]-h;j.y=i[1]+g;break;case"br":j.x=i[0]+h;j.y=i[1]+g;break;case"tr":j.x=i[0]+h;j.y=i[1]-g;break}this.to=j;this.on("afteranimate",function(){if(c.dom){c.hide();c.clearOpacity();c.setPositioning(e)}})};c.animate(Ext.applyIf(d||{},{duration:500,easing:"ease-out",listeners:{beforeanimate:{fn:b}}}));return c},highlight:function(d,b){var i=this,e=i.dom,k={},h,l,g,c,a,j;b=b||{};c=b.listeners||{};g=b.attr||"backgroundColor";k[g]=d||"ffff9c";if(!b.to){l={};l[g]=b.endColor||i.getColor(g,"ffffff","")}else{l=b.to}b.listeners=Ext.apply(Ext.apply({},c),{beforeanimate:function(){h=e.style[g];i.clearOpacity();i.show();a=c.beforeanimate;if(a){j=a.fn||a;return j.apply(a.scope||c.scope||window,arguments)}},afteranimate:function(){if(e){e.style[g]=h}a=c.afteranimate;if(a){j=a.fn||a;j.apply(a.scope||c.scope||window,arguments)}}});i.animate(Ext.apply({},b,{duration:1000,easing:"ease-in",from:k,to:l}));return i},pause:function(a){var b=this;Ext.fx.Manager.setFxDefaults(b.id,{delay:a});return b},fadeIn:function(a){this.animate(Ext.apply({},a,{opacity:1}));return this},fadeOut:function(b){var a=this;a.animate(Ext.applyIf(b||{},{opacity:0,internalListeners:{afteranimate:function(c){var d=a.dom;if(d&&c.to.opacity===0){if(b.useDisplay){a.setDisplayed(false)}else{a.hide()}}}}}));return a},scale:function(a,b,c){this.animate(Ext.apply({},c,{width:a,height:b}));return this},shift:function(a){this.animate(a);return this}});Ext.dom.Element.override({initDD:function(c,b,d){var a=new Ext.dd.DD(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDProxy:function(c,b,d){var a=new Ext.dd.DDProxy(Ext.id(this.dom),c,b);return Ext.apply(a,d)},initDDTarget:function(c,b,d){var a=new Ext.dd.DDTarget(Ext.id(this.dom),c,b);return Ext.apply(a,d)}});(function(){var b=Ext.dom.Element,i="visibility",g="display",l="none",e="hidden",m="offsets",j="asclass",a="nosize",c="originalDisplay",d="visibilityMode",h="isVisible",k=function(p){var o=b.data(p,c);if(o===undefined){b.data(p,c,o="")}return o},n=function(p){var o=b.data(p,d);if(o===undefined){b.data(p,d,o=1)}return o};b.override({originalDisplay:"",visibilityMode:1,setVisible:function(r,o){var u=this,p,w,v,t,s=u.dom,q=n(s);if(typeof o=="string"){switch(o){case g:q=Ext.dom.Element.DISPLAY;break;case i:q=Ext.dom.Element.VISIBILITY;break;case m:q=Ext.dom.Element.OFFSETS;break;case a:case j:q=Ext.dom.Element.ASCLASS;break}u.setVisibilityMode(q);o=false}if(!o||!u.anim){if(q==Ext.dom.Element.ASCLASS){u[r?"removeCls":"addCls"](u.visibilityCls||Ext.dom.Element.visibilityCls)}else{if(q==Ext.dom.Element.DISPLAY){return u.setDisplayed(r)}else{if(q==Ext.dom.Element.OFFSETS){if(!r){if(!u.hideModeStyles){u.hideModeStyles={position:u.getStyle("position"),top:u.getStyle("top"),left:u.getStyle("left")}}u.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{if(u.hideModeStyles){u.applyStyles(u.hideModeStyles||{position:"",top:"",left:""});delete u.hideModeStyles}}}else{u.fixDisplay();s.style.visibility=r?"":e}}}}else{if(r){u.setOpacity(0.01);u.setVisible(true)}if(!Ext.isObject(o)){o={duration:350,easing:"ease-in"}}u.animate(Ext.applyIf({callback:function(){r||u.setVisible(false).setOpacity(1)},to:{opacity:(r)?1:0}},o))}b.data(s,h,r);return u},hasMetrics:function(){var o=this.dom;return this.isVisible()||(n(o)==Ext.dom.Element.OFFSETS)||(n(o)==Ext.dom.Element.VISIBILITY)},toggle:function(o){var p=this;p.setVisible(!p.isVisible(),p.anim(o));return p},setDisplayed:function(o){if(typeof o=="boolean"){o=o?k(this.dom):l}this.setStyle(g,o);return this},fixDisplay:function(){var o=this;if(o.isStyle(g,l)){o.setStyle(i,e);o.setStyle(g,k(this.dom));if(o.isStyle(g,l)){o.setStyle(g,"block")}}},hide:function(o){if(typeof o=="string"){this.setVisible(false,o);return this}this.setVisible(false,this.anim(o));return this},show:function(o){if(typeof o=="string"){this.setVisible(true,o);return this}this.setVisible(true,this.anim(o));return this}})})();(function(){var a=Ext.dom.Element,b="left",g="right",d="top",i="bottom",h="position",c="static",e="relative",j="auto",k="z-index";a.override({getX:function(){return a.getX(this.dom)},getY:function(){return a.getY(this.dom)},getXY:function(){return a.getXY(this.dom)},getOffsetsTo:function(l){var n=this.getXY(),m=Ext.fly(l,"_internal").getXY();return[n[0]-m[0],n[1]-m[1]]},setX:function(l,m){return this.setXY([l,this.getY()],m)},setY:function(m,l){return this.setXY([this.getX(),m],l)},setLeft:function(l){this.setStyle(b,this.addUnits(l));return this},setTop:function(l){this.setStyle(d,this.addUnits(l));return this},setRight:function(l){this.setStyle(g,this.addUnits(l));return this},setBottom:function(l){this.setStyle(i,this.addUnits(l));return this},setXY:function(n,l){var m=this;if(!l||!m.anim){a.setXY(m.dom,n)}else{if(!Ext.isObject(l)){l={}}m.animate(Ext.applyIf({to:{x:n[0],y:n[1]}},l))}return m},getLeft:function(l){return !l?this.getX():parseInt(this.getStyle(b),10)||0},getRight:function(l){var m=this;return !l?m.getX()+m.getWidth():(m.getLeft(true)+m.getWidth())||0},getTop:function(l){return !l?this.getY():parseInt(this.getStyle(d),10)||0},getBottom:function(l){var m=this;return !l?m.getY()+m.getHeight():(m.getTop(true)+m.getHeight())||0},translatePoints:function(l,s){if(Ext.isArray(l)){s=l[1];l=l[0]}var m=this,n=m.isStyle(h,e),r=m.getXY(),q=parseInt(m.getStyle(b),10),p=parseInt(m.getStyle(d),10);if(!Ext.isNumber(q)){q=n?0:m.dom.offsetLeft}if(!Ext.isNumber(p)){p=n?0:m.dom.offsetTop}q=(Ext.isNumber(l))?l-r[0]+q:undefined;p=(Ext.isNumber(s))?s-r[1]+p:undefined;return{left:q,top:p}},setBox:function(p,q,m){var o=this,l=p.width,n=p.height;if((q&&!o.autoBoxAdjust)&&!o.isBorderBox()){l-=(o.getBorderWidth("lr")+o.getPadding("lr"));n-=(o.getBorderWidth("tb")+o.getPadding("tb"))}o.setBounds(p.x,p.y,l,n,m);return o},getBox:function(s,z){var v=this,D,o,y,n=v.getBorderWidth,A=v.getPadding,p,m,C,x,B,q,u;if(!z){D=v.getXY()}else{o=parseInt(v.getStyle("left"),10)||0;y=parseInt(v.getStyle("top"),10)||0;D=[o,y]}B=v.getWidth();q=v.getHeight();if(!s){u={x:D[0],y:D[1],0:D[0],1:D[1],width:B,height:q}}else{p=n.call(v,"l")+A.call(v,"l");m=n.call(v,"r")+A.call(v,"r");C=n.call(v,"t")+A.call(v,"t");x=n.call(v,"b")+A.call(v,"b");u={x:D[0]+p,y:D[1]+C,0:D[0]+p,1:D[1]+C,width:B-(p+m),height:q-(C+x)}}u.right=u.x+u.width;u.bottom=u.y+u.height;return u},getPageBox:function(p){var s=this,n=s.dom,v=n===document.body,x=v?Ext.dom.AbstractElement.getViewWidth():n.offsetWidth,q=v?Ext.dom.AbstractElement.getViewHeight():n.offsetHeight,z=s.getXY(),y=z[1],m=z[0]+x,u=z[1]+q,o=z[0];if(p){return new Ext.util.Region(y,m,u,o)}else{return{left:o,top:y,width:x,height:q,right:m,bottom:u}}},setLocation:function(l,n,m){return this.setXY([l,n],m)},moveTo:function(l,n,m){return this.setXY([l,n],m)},position:function(p,o,l,n){var m=this;if(!p&&m.isStyle(h,c)){m.setStyle(h,e)}else{if(p){m.setStyle(h,p)}}if(o){m.setStyle(k,o)}if(l||n){m.setXY([l||false,n||false])}},clearPositioning:function(l){l=l||"";this.setStyle({left:l,right:l,top:l,bottom:l,"z-index":"",position:c});return this},getPositioning:function(){var m=this.getStyle(b);var n=this.getStyle(d);return{position:this.getStyle(h),left:m,right:m?"":this.getStyle(g),top:n,bottom:n?"":this.getStyle(i),"z-index":this.getStyle(k)}},setPositioning:function(l){var n=this,m=n.dom.style;n.setStyle(l);if(l.right==j){m.right=""}if(l.bottom==j){m.bottom=""}return n},move:function(t,m,n){var q=this,w=q.getXY(),u=w[0],s=w[1],o=[u-m,s],v=[u+m,s],r=[u,s-m],l=[u,s+m],p={l:o,left:o,r:v,right:v,t:r,top:r,up:r,b:l,bottom:l,down:l};t=t.toLowerCase();q.moveTo(p[t][0],p[t][1],n)},setLeftTop:function(n,m){var l=this.dom.style;l.left=a.addUnits(n);l.top=a.addUnits(m);return this},getRegion:function(){return this.getPageBox(true)},getViewRegion:function(){var p=this,n=p.dom===document.body,m,s,r,q,o,l;if(n){m=p.getScroll();q=m.left;r=m.top;o=Ext.dom.AbstractElement.getViewportWidth();l=Ext.dom.AbstractElement.getViewportHeight()}else{s=p.getXY();q=s[0]+p.getBorderWidth("l")+p.getPadding("l");r=s[1]+p.getBorderWidth("t")+p.getPadding("t");o=p.getWidth(true);l=p.getHeight(true)}return new Ext.util.Region(r,q+o,r+l,q)},setBounds:function(m,q,o,l,n){var p=this;if(!n||!p.anim){p.setSize(o,l);p.setLocation(m,q)}else{if(!Ext.isObject(n)){n={}}p.animate(Ext.applyIf({to:{x:m,y:q,width:p.adjustWidth(o),height:p.adjustHeight(l)}},n))}return p},setRegion:function(m,l){return this.setBounds(m.left,m.top,m.right-m.left,m.bottom-m.top,l)}})})();Ext.dom.Element.override({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e},scrollBy:function(b,a,c){var d=this,e=d.dom;if(b.length){c=a;a=b[1];b=b[0]}else{if(typeof b!="number"){c=a;a=b.y;b=b.x}}if(b){d.scrollTo("left",Math.max(Math.min(e.scrollLeft+b,e.scrollWidth-e.clientWidth),0),c)}if(a){d.scrollTo("top",Math.max(Math.min(e.scrollTop+a,e.scrollHeight-e.clientHeight),0),c)}return d},scrollTo:function(b,d,a){var g=/top/i.test(b),c=this,h=c.dom,e={},i;if(!a||!c.anim){i="scroll"+(g?"Top":"Left");h[i]=d}else{if(!Ext.isObject(a)){a={}}e["scroll"+(g?"Top":"Left")]=d;c.animate(Ext.applyIf({to:e},a))}return c},scrollIntoView:function(b,e){b=Ext.getDom(b)||Ext.getBody().dom;var c=this.dom,h=this.getOffsetsTo(b),g=h[0]+b.scrollLeft,j=h[1]+b.scrollTop,a=j+c.offsetHeight,k=g+c.offsetWidth,n=b.clientHeight,m=parseInt(b.scrollTop,10),d=parseInt(b.scrollLeft,10),i=m+n,l=d+b.clientWidth;if(c.offsetHeight>n||j<m){b.scrollTop=j}else{if(a>i){b.scrollTop=a-n}}b.scrollTop=b.scrollTop;if(e!==false){if(c.offsetWidth>b.clientWidth||g<d){b.scrollLeft=g}else{if(k>l){b.scrollLeft=k-b.clientWidth}}b.scrollLeft=b.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.anim(d))}return c}});(function(){var a=Ext.dom.Element,i=document.defaultView;var j=/table-row|table-.*-group/,h="_internal",b="hidden",g="isClipped",e="overflow",d="overflow-x",c="overflow-y",k="originalClip";a.inheritedProps={fontSize:1,fontStyle:1,opacity:1};if(!i||!i.getComputedStyle){a.override({getStyle:Ext.isIE6?function(r){var n=this,q=n.dom,o=n.styleHooks[r],l,m;if(q==document){return null}if(!o){n.styleHooks[r]=o={name:a.normalize(r)}}if(o.get){return o.get(q,n)}l=o.name;do{try{return q.style[l]||((m=q.currentStyle)?m[l]:null)}catch(p){}if(!a.inheritedProps[l]){break}q=q.parentNode}while(q);return null}:function(q){var n=this,p=n.dom,o=n.styleHooks[q],l,m;if(p==document){return null}if(!o){n.styleHooks[q]=o={name:a.normalize(q)}}if(o.get){return o.get(p,n)}l=o.name;return p.style[l]||((m=p.currentStyle)?m[l]:null)}})}a.override({getHeight:function(s,n){var r=this,o=r.dom,p=Ext.isIE&&r.isStyle("display","none"),t,m,l,q;if(Ext.isIEQuirks){l=o.style;m=l.overflow;r.setStyle({overflow:"hidden"})}t=o.offsetHeight;t=Math.max(t,p?0:o.clientHeight)||0;if(!p&&Ext.supports.Direct2DBug){q=r.adjustDirect2DDimension("height");if(n){t+=q}else{if(q>0&&q<0.5){t++}}}if(s){t-=(r.getBorderWidth("tb")+r.getPadding("tb"))}if(Ext.isIEQuirks){r.setStyle({overflow:m})}if(t<0){t=0}return t},getWidth:function(l,v){var s=this,p=s.dom,q=Ext.isIE&&s.isStyle("display","none"),t,n,o,m,r,u;if(Ext.isIEQuirks){m=p.style;o=m.overflow;s.setStyle({overflow:"hidden"})}if(Ext.isOpera10_5){if(p.parentNode.currentStyle.position==="relative"){u=p.parentNode.style.position;p.parentNode.style.position="static";n=p.offsetWidth;p.parentNode.style.position=u}n=Math.max(n||0,p.offsetWidth)}else{if(Ext.supports.BoundingClientRect){t=p.getBoundingClientRect();n=t.right-t.left;n=v?n:Math.ceil(n)}else{n=p.offsetWidth}}n=Math.max(n,q?0:p.clientWidth)||0;if(!q&&Ext.supports.Direct2DBug){r=s.adjustDirect2DDimension("width");if(v){n+=r}else{if(r>0&&r<0.5){n++}}}if(l){n-=(s.getBorderWidth("lr")+s.getPadding("lr"))}if(Ext.isIEQuirks){s.setStyle({overflow:o})}if(n<0){n=0}return n},setWidth:function(m,l){var n=this;m=n.adjustWidth(m);if(!l||!n.anim){n.dom.style.width=n.addUnits(m)}else{if(!Ext.isObject(l)){l={}}n.animate(Ext.applyIf({to:{width:m}},l))}return n},setHeight:function(l,m){var n=this;l=n.adjustHeight(l);if(!m||!n.anim){n.dom.style.height=n.addUnits(l)}else{if(!Ext.isObject(m)){m={}}n.animate(Ext.applyIf({to:{height:l}},m))}return n},applyStyles:function(l){Ext.DomHelper.applyStyles(this.dom,l);return this},setSize:function(n,l,m){var o=this;if(Ext.isObject(n)){m=l;l=n.height;n=n.width}n=o.adjustWidth(n);l=o.adjustHeight(l);if(!m||!o.anim){o.dom.style.width=o.addUnits(n);o.dom.style.height=o.addUnits(l)}else{if(m===true){m={}}o.animate(Ext.applyIf({to:{width:n,height:l}},m))}return o},getViewSize:function(){var o=this,p=o.dom,m=(p==Ext.getDoc().dom||p==Ext.getBody().dom),n,q,l;if(m){l={width:a.getViewWidth(),height:a.getViewHeight()}}else{if(Ext.isIE6||Ext.isIEQuirks){n=p.style;q=n.overflow;o.setStyle({overflow:"hidden"})}l={width:p.clientWidth,height:p.clientHeight};if(Ext.isIE6||Ext.isIEQuirks){o.setStyle({overflow:q})}}return l},getSize:function(l){return{width:this.getWidth(l),height:this.getHeight(l)}},adjustWidth:function(l){var m=this,n=(typeof l=="number");if(n&&m.autoBoxAdjust&&!m.isBorderBox()){l-=(m.getBorderWidth("lr")+m.getPadding("lr"))}return(n&&l<0)?0:l},adjustHeight:function(l){var m=this,n=(typeof l=="number");if(n&&m.autoBoxAdjust&&!m.isBorderBox()){l-=(m.getBorderWidth("tb")+m.getPadding("tb"))}return(n&&l<0)?0:l},getColor:function(l,m,q){var o=this.getStyle(l),n=q||q===""?q:"#",p;if(!o||(/transparent|inherit/.test(o))){return m}if(/^r/.test(o)){Ext.each(o.slice(4,o.length-1).split(","),function(r){p=parseInt(r,10);n+=(p<16?"0":"")+p.toString(16)})}else{o=o.replace("#","");n+=o.length==3?o.replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3"):o}return(n.length>5?n.toLowerCase():m)},setOpacity:function(m,l){var n=this;if(!n.dom){return n}if(!l||!n.anim){n.setStyle("opacity",m)}else{if(!Ext.isObject(l)){l={duration:350,easing:"ease-in"}}n.animate(Ext.applyIf({to:{opacity:m}},l))}return n},clearOpacity:function(){return this.setOpacity("")},adjustDirect2DDimension:function(p){var n=this,q=n.dom,o=n.getStyle("display"),m=q.style.display,l=q.style.position,s=p==="width"?0:1,r;if(o==="inline"){q.style.display="inline-block"}q.style.position=o.match(j)?"absolute":"static";r=(parseFloat(n.getStyle(p))||parseFloat(q.currentStyle.msTransformOrigin.split(" ")[s])*2)%1;q.style.position=l;if(o==="inline"){q.style.display=m}return r},clip:function(){var l=this,m=l.dom;if(!a.data(m,g)){a.data(m,g,true);a.data(m,k,{o:l.getStyle(e),x:l.getStyle(d),y:l.getStyle(c)});l.setStyle(e,b);l.setStyle(d,b);l.setStyle(c,b)}return l},unclip:function(){var m=this,n=m.dom,l;if(a.data(n,g)){a.data(n,g,false);l=a.data(n,k);if(l.o){m.setStyle(e,l.o)}if(l.x){m.setStyle(d,l.x)}if(l.y){m.setStyle(c,l.y)}}return m},getStyles:function(){var o={},l=arguments.length,m=0,n;for(;m<l;++m){n=arguments[m];o[n]=this.getStyle(n)}return o},boxWrap:function(l){l=l||Ext.baseCSSPrefix+"box";var m=Ext.get(this.insertHtml("beforeBegin","<div class='"+l+"'>"+Ext.String.format(a.boxMarkup,l)+"</div>"));Ext.DomQuery.selectNode("."+l+"-mc",m.dom).appendChild(this.dom);return m},getComputedHeight:function(){var m=this,l=Math.max(m.dom.offsetHeight,m.dom.clientHeight);if(!l){l=parseFloat(m.getStyle("height"))||0;if(!m.isBorderBox()){l+=m.getFrameWidth("tb")}}return l},getComputedWidth:function(){var m=this,l=Math.max(m.dom.offsetWidth,m.dom.clientWidth);if(!l){l=parseFloat(m.getStyle("width"))||0;if(!m.isBorderBox()){l+=m.getFrameWidth("lr")}}return l},getFrameWidth:function(m,l){return l&&this.isBorderBox()?0:(this.getPadding(m)+this.getBorderWidth(m))},addClsOnOver:function(l){var m=this.dom;this.hover(function(){Ext.fly(m,h).addCls(l)},function(){Ext.fly(m,h).removeCls(l)});return this},addClsOnFocus:function(l){var m=this,n=m.dom;m.on("focus",function(){Ext.fly(n,h).addCls(l)});m.on("blur",function(){Ext.fly(n,h).removeCls(l)});return m},addClsOnClick:function(l){var m=this.dom;this.on("mousedown",function(){Ext.fly(m,h).addCls(l);var o=Ext.getDoc(),n=function(){Ext.fly(m,h).removeCls(l);o.removeListener("mouseup",n)};o.on("mouseup",n)});return this},getStyleSize:function(){var p=this,q=document,r=this.dom,m=(r==q||r==q.body),o=r.style,l,n;if(m){return{width:a.getViewWidth(),height:a.getViewHeight()}}if(o.width&&o.width!="auto"){l=parseFloat(o.width);if(p.isBorderBox()){l-=p.getFrameWidth("lr")}}if(o.height&&o.height!="auto"){n=parseFloat(o.height);if(p.isBorderBox()){n-=p.getFrameWidth("tb")}}return{width:l||p.getWidth(true),height:n||p.getHeight(true)}},selectable:function(){var l=this;l.dom.unselectable="off";l.on("selectstart",function(m){m.stopPropagation();return true});l.applyStyles("-moz-user-select: text; -khtml-user-select: text;");l.removeCls(Ext.baseCSSPrefix+"unselectable");return l},unselectable:function(){var l=this;l.dom.unselectable="on";l.swallowEvent("selectstart",true);l.applyStyles("-moz-user-select:-moz-none;-khtml-user-select:none;");l.addCls(Ext.baseCSSPrefix+"unselectable");return l}})})();Ext.onReady(function(){var b=/alpha\(opacity=(.*)\)/i,a=/^\s+|\s+$/g;Ext.dom.Element.prototype.styleHooks=Ext.dom.AbstractElement.prototype.styleHooks;if(!Ext.supports.Opacity&&Ext.isIE){Ext.dom.Element.prototype.styleHooks.opacity={name:"opacity",get:function(g){var e=g.style.filter,d,c;if(e.match){d=e.match(b);if(d){c=parseFloat(d[1]);if(!isNaN(c)){return c?c/100:0}}}return 1},set:function(g,d){var c=g.style,e=c.filter.replace(b,"").replace(a,"");c.zoom=1;if(typeof(d)=="number"&&d>=0&&d<1){d*=100;c.filter=e+(e.length?" ":"")+"alpha(opacity="+d+")"}else{c.filter=e}}}}});Ext.dom.Element.override({select:function(a){return Ext.dom.Element.select(a,false,this.dom)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:"Ext.CompositeElementLite",requires:["Ext.dom.Element"],statics:{importElementMethods:function(){var b,c=Ext.dom.Element.prototype,a=this.prototype;for(b in c){if(typeof c[b]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,b)}}}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.AbstractElement.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a)},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b<d;++b){e.push(this.transformElement(c[b]))}return this},invoke:function(d,a){var g=this.elements,e=g.length,c,b;for(b=0;b<e;b++){c=g[b];if(c){Ext.dom.Element.prototype[d].apply(this.getElement(c),a)}}return this},item:function(b){var c=this.elements[b],a=null;if(c){a=this.getElement(c)}return a},addListener:function(b,j,h,g){var d=this.elements,a=d.length,c,k;for(c=0;c<a;c++){k=d[c];if(k){Ext.EventManager.on(k,b,j,h||k,g)}}return this},each:function(g,d){var h=this,c=h.elements,a=c.length,b,j;for(b=0;b<a;b++){j=c[b];if(j){j=this.getElement(j);if(g.call(d||j,j,h,b)===false){break}}}return h},fill:function(a){var b=this;b.elements=[];b.add(a);return b},filter:function(a){var b=[],d=this,c=Ext.isFunction(a)?a:function(e){return e.is(a)};d.each(function(h,e,g){if(c(h,g)!==false){b[b.length]=d.transformElement(h)}});d.elements=b;return d},indexOf:function(a){return Ext.Array.indexOf(this.elements,this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(c,e){var b=this,d=this.elements,a;Ext.each(c,function(g){if((a=(d[g]||d[g=b.indexOf(g)]))){if(e){if(a.dom){a.remove()}else{Ext.removeNode(a)}}Ext.Array.erase(d,g,1)}});return this}},function(){this.importElementMethods();this.prototype.on=this.prototype.addListener;if(Ext.DomQuery){Ext.dom.Element.selectorFunction=Ext.DomQuery.select}Ext.dom.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return new Ext.CompositeElementLite(c)};Ext.select=function(){return Ext.dom.Element.select.apply(Ext.dom.Element,arguments)}});Ext.define("Ext.dom.CompositeElement",{alternateClassName:"Ext.CompositeElement",extend:"Ext.dom.CompositeElementLite",getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}},function(){Ext.dom.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)}});Ext.select=Ext.Element.select;Ext.define("Ext.AbstractPlugin",{disabled:false,constructor:function(a){Ext.apply(this,a)},getCmp:function(){return this.cmp},init:Ext.emptyFn,destroy:Ext.emptyFn,enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var h=this,k=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(p,o){return o.method.apply(this,[p].concat(o.args))},a=function(q,u){var o=[],r=0,t=q.length,s,p=u!==">";for(;r<t;r++){s=q[r];if(s.getRefItems){o=o.concat(s.getRefItems(p))}}return o},g=function(p){var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];while(!!(r=(r.ownerCt||r.floatParent))){o.push(r)}}return o},m=function(p,u,t){if(u==="*"){return p.slice()}else{var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];if(r.isXType(u,t)){o.push(r)}}return o}},j=function(p,s){var u=Ext.Array,o=[],q=0,t=p.length,r;for(;q<t;q++){r=p[q];if(r.hasCls(s)){o.push(r)}}return o},n=function(q,v,p,u){var o=[],r=0,t=q.length,s;for(;r<t;r++){s=q[r];if(!u?!!s[v]:(String(s[v])===u)){o.push(s)}}return o},d=function(p,t){var o=[],q=0,s=p.length,r;for(;q<s;q++){r=p[q];if(r.getItemId()===t){o.push(r)}}return o},l=function(o,p,q){return h.pseudos[p](o,q)},i=/^(\s?([>\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:m},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:n},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:l},{re:/^(?:\{([^\}]+)\})/,method:k}];h.Query=Ext.extend(Object,{constructor:function(o){o=o||{};Ext.apply(this,o)},execute:function(p){var r=this.operations,s=0,t=r.length,q,o;if(!p){o=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(p)){o=p}}for(;s<t;s++){q=r[s];if(q.mode==="^"){o=g(o||[p])}else{if(q.mode){o=a(o||[p],q.mode)}else{o=e(o||a([p]),q)}}if(s===t-1){return o}}return[]},is:function(q){var p=this.operations,t=Ext.isArray(q)?q:[q],o=t.length,u=p[p.length-1],s,r;t=e(t,u);if(t.length===o){if(p.length>1){for(r=0,s=t.length;r<s;r++){if(Ext.Array.indexOf(this.execute(),t[r])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(u,o){var v=Ext.ComponentQuery,s=0,t=u.length,r=[],q=-1,p;for(;s<t;++s){p=u[s];if(!v.is(p,o)){r[++q]=p}}return r},last:function(o){return o[o.length-1]}},query:function(p,w){var x=p.split(","),o=x.length,q=0,r=[],y=[],v={},t,s,u;for(;q<o;q++){p=Ext.String.trim(x[q]);t=this.cache[p];if(!t){this.cache[p]=t=this.parse(p)}r=r.concat(t.execute(w))}if(o>1){s=r.length;for(q=0;q<s;q++){u=r[q];if(!v[u.id]){y.push(u);v[u.id]=true}}r=y}return r},is:function(p,o){if(!o){return true}var q=this.cache[o];if(!q){this.cache[o]=q=this.parse(o)}return q.is(p)},parse:function(r){var p=[],q=b.length,v,s,w,x,y,t,u,o;while(r&&v!==r){v=r;s=r.match(c);if(s){w=s[1];if(w==="#"){p.push({method:d,args:[Ext.String.trim(s[2])]})}else{if(w==="."){p.push({method:j,args:[Ext.String.trim(s[2])]})}else{p.push({method:m,args:[Ext.String.trim(s[2]),Boolean(s[3])]})}}r=r.replace(s[0],"")}while(!(x=r.match(i))){for(t=0;r&&t<q;t++){u=b[t];y=r.match(u.re);o=u.method;if(y){p.push({method:Ext.isString(u.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[o].concat(y.slice(1)))):u.method,args:y.slice(1)});r=r.replace(y[0],"");break}}}if(x[1]){p.push({mode:x[2]||x[1]});r=r.replace(x[0],"")}}return new h.Query({operations:p})}})});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var g=this,b=arguments,a=[],c=0,e=b.length,h;g.initialConfig={};if(e>1){for(;c<e;c++){h=b[c];if(typeof h=="object"){Ext.apply(g.initialConfig,h);Ext.apply(g,h)}else{a.push(h)}}d=a.join("")}else{if(Ext.isArray(d)){a.push(d.join(""))}else{a.push(d)}}g.html=a.join("");if(g.compiled){g.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,apply:function(a){var h=this,d=h.disableFormats!==true,g=Ext.util.Format,c=h,b;if(h.compiled){return h.compiled(a).join("")}function e(i,k,l,j){if(l&&d){if(j){j=[a[k]].concat(Ext.functionFactory("return ["+j+"];")())}else{j=[a[k]]}if(l.substr(0,5)=="this."){return c[l.substr(5)].apply(c,j)}else{return g[l].apply(g,j)}}else{return a[k]!==undefined?a[k]:""}}b=h.html.replace(h.re,e);return b},applyOut:function(a,b){var c=this;if(c.compiled){b.push.apply(b,c.compiled(a))}else{b.push(c.apply(a))}return b},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'];};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.apply(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.apply(a);return c?Ext.get(b.firstChild,true):b.firstChild}});Ext.define("Ext.XTemplateParser",{constructor:function(a){Ext.apply(this,a)},doTpl:Ext.emptyFn,parse:function(o){var p=this,n=o.length,c={elseif:"elif"},k=p.topRe,b=p.actionsRe,l,q,u,g,r,h,a,e,d,i,j;p.level=0;p.stack=q=[];for(l=0;l<n;l=i){k.lastIndex=l;g=k.exec(o);if(!g){p.doText(o.substring(l,n));break}d=g.index;i=k.lastIndex;if(l<d){p.doText(o.substring(l,d))}if(g[1]){i=o.indexOf("%}",d+2);p.doEval(o.substring(d+2,i));i+=2}else{if(g[2]){i=o.indexOf("]}",d+2);p.doExpr(o.substring(d+2,i));i+=2}else{if(g[3]){p.doTag(g[3])}else{if(g[4]){j=null;while((e=b.exec(g[4]))!==null){u=e[2]||e[3];if(u){u=Ext.String.htmlDecode(u);r=e[1];r=c[r]||r;j=j||{};h=j[r];if(typeof h=="string"){j[r]=[h,u]}else{if(h){j[r].push(u)}else{j[r]=u}}}}if(!j){if(p.elseRe.test(g[4])){p.doElse()}else{if(p.defaultRe.test(g[4])){p.doDefault()}else{p.doTpl();q.push({type:"tpl"})}}}else{if(j["if"]){p.doIf(j["if"],j);q.push({type:"if"})}else{if(j["switch"]){p.doSwitch(j["switch"],j);q.push({type:"switch"})}else{if(j["case"]){p.doCase(j["case"],j)}else{if(j.elif){p.doElseIf(j.elif,j)}else{if(j["for"]){++p.level;p.doFor(j["for"],j);q.push({type:"for",actions:j})}else{if(j.exec){p.doExec(j.exec,j);q.push({type:"exec",actions:j})}}}}}}}}else{a=q.pop();p.doEnd(a.type,a.actions);if(a.type=="for"){--p.level}}}}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]*)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:["]([^"]*)["])|(?:[']([^']*)[']))\s*/g,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.chart.Callout",{constructor:function(a){if(a.callouts){a.callouts.styles=Ext.applyIf(a.callouts.styles||{},{color:"#000",font:"11px Helvetica, sans-serif"});this.callouts=Ext.apply(this.callouts||{},a.callouts);this.calloutsArray=[]}},renderCallouts:function(){if(!this.callouts){return}var v=this,m=v.items,a=v.chart.animate,u=v.callouts,h=u.styles,e=v.calloutsArray,b=v.chart.store,s=b.getCount(),d=m.length/s,l=[],r,c,q,n;for(r=0,c=0;r<s;r++){for(q=0;q<d;q++){var t=m[c],g=e[c],k=b.getAt(r),o;o=u.filter(k);if(!o&&!g){c++;continue}if(!g){e[c]=g=v.onCreateCallout(k,t,r,o,q,c)}for(n in g){if(g[n]&&g[n].setAttributes){g[n].setAttributes(h,true)}}if(!o){for(n in g){if(g[n]){if(g[n].setAttributes){g[n].setAttributes({hidden:true},true)}else{if(g[n].setVisible){g[n].setVisible(false)}}}}}u.renderer(g,k);v.onPlaceCallout(g,k,t,r,o,a,q,c,l);l.push(g);c++}}this.hideCallouts(c)},onCreateCallout:function(g,n,e,j){var k=this,l=k.calloutsGroup,d=k.callouts,o=d.styles,c=o.width,m=o.height,h=k.chart,b=h.surface,a={lines:false};a.lines=b.add(Ext.apply({},{type:"path",path:"M0,0",stroke:k.getLegendColor()||"#555"},o));if(d.items){a.panel=new Ext.Panel({style:"position: absolute;",width:c,height:m,items:d.items,renderTo:h.el})}return a},hideCallouts:function(b){var d=this.calloutsArray,a=d.length,e,c;while(a-->b){e=d[a];for(c in e){if(e[c]){e[c].hide(true)}}}}});Ext.define("Ext.chart.Navigation",{constructor:function(){this.originalStore=this.store},setZoom:function(a){var c=this,g=c.axes,h=c.chartBBox,e=1/h.width,b=1/h.height,d={x:a.x*e,y:a.y*b,width:a.width*e,height:a.height*b};g.each(function(j){var i=j.calcEnds();if(j.position=="bottom"||j.position=="top"){var l=(i.to-i.from)*d.x+i.from,k=(i.to-i.from)*d.width+l;j.minimum=l;j.maximum=k}else{var k=(i.to-i.from)*(1-d.y)+i.from,l=k-(i.to-i.from)*d.height;j.minimum=l;j.maximum=k}});c.redraw(false)},restoreZoom:function(){this.store=this.substore=this.originalStore;this.redraw(true)}});Ext.define("Ext.chart.Shape",{singleton:true,circle:function(a,b){return a.add(Ext.apply({type:"circle",x:b.x,y:b.y,stroke:null,radius:b.radius},b))},line:function(a,b){return a.add(Ext.apply({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius/5},b))},square:function(a,b){return a.add(Ext.applyIf({type:"rect",x:b.x-b.radius,y:b.y-b.radius,height:2*b.radius,width:2*b.radius,radius:null},b))},triangle:function(a,b){b.radius*=1.75;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(b.x,",",b.y,"m0-",b.radius*0.58,"l",b.radius*0.5,",",b.radius*0.87,"-",b.radius,",0z")},b))},diamond:function(a,c){var b=c.radius;b*=1.5;return a.add(Ext.apply({type:"path",stroke:null,path:["M",c.x,c.y-b,"l",b,b,-b,b,-b,-b,b,-b,"z"]},c))},cross:function(a,c){var b=c.radius;b=b/1.7;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b,",",c.y,"l",[-b,-b,b,-b,b,b,b,-b,b,b,-b,b,b,b,-b,b,-b,-b,-b,b,-b,-b,"z"])},c))},plus:function(a,c){var b=c.radius/1.3;return a.add(Ext.apply({type:"path",stroke:null,path:"M".concat(c.x-b/2,",",c.y-b/2,"l",[0,-b,b,0,0,b,b,0,0,b,-b,0,0,b,-b,0,0,-b,-b,0,0,-b,"z"])},c))},arrow:function(a,c){var b=c.radius;return a.add(Ext.apply({type:"path",path:"M".concat(c.x-b*0.7,",",c.y-b*0.4,"l",[b*0.6,0,0,-b*0.4,b,b*0.8,-b,b*0.8,0,-b*0.4,-b*0.6,0],"z")},c))},drop:function(b,a,g,e,c,d){c=c||30;d=d||0;b.add({type:"path",path:["M",a,g,"l",c,0,"A",c*0.4,c*0.4,0,1,0,a+c*0.7,g-c*0.7,"z"],fill:"#000",stroke:"none",rotate:{degrees:22.5-d,x:a,y:g}});d=(d+90)*Math.PI/180;b.add({type:"text",x:a+c*Math.sin(d)-10,y:g+c*Math.cos(d)+5,text:e,"font-size":c*12/40,stroke:"none",fill:"#fff"})}});Ext.define("Ext.data.IdGenerator",{isGenerator:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.id){Ext.data.IdGenerator.all[b.id]=b}},getRecId:function(a){return a.modelName+"-"+a.internalId},statics:{all:{},get:function(a){var c,d,b;if(typeof a=="string"){d=b=a;a=null}else{if(a.isGenerator){return a}else{d=a.id||a.type;b=a.type}}c=this.all[d];if(!c){c=Ext.create("idgen."+b,a)}return c}}});Ext.define("Ext.data.JsonP",{singleton:true,statics:{requestCount:0,requests:{}},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(n){n=Ext.apply({},n);var j=this,d=Ext.isDefined(n.disableCaching)?n.disableCaching:j.disableCaching,h=n.disableCachingParam||j.disableCachingParam,c=++j.statics().requestCount,l=n.callbackName||"callback"+c,i=n.callbackKey||j.callbackKey,m=Ext.isDefined(n.timeout)?n.timeout:j.timeout,e=Ext.apply({},n.params),b=n.url,a=Ext.name,g,k;e[i]=a+".data.JsonP."+l;if(d){e[h]=new Date().getTime()}k=j.createScript(b,e,n);j.statics().requests[c]=g={url:b,params:e,script:k,id:c,scope:n.scope,success:n.success,failure:n.failure,callback:n.callback,callbackKey:i,callbackName:l};if(m>0){g.timeout=setTimeout(Ext.bind(j.handleTimeout,j,[g]),m)}j.setupErrorHandling(g);j[l]=Ext.bind(j.handleResponse,j,[g],true);j.loadScript(g);return g},abort:function(c){var b=this,d=b.statics().requests,a;if(c){if(!c.id){c=d[c]}b.handleAbort(c)}else{for(a in d){if(d.hasOwnProperty(a)){b.abort(d[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.statics().requests[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).remove();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.Operation",{synchronous:true,action:undefined,filters:undefined,sorters:undefined,groupers:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(a){Ext.apply(this,a||{})},commitRecords:function(b){var g=this,h,c,d,e,a;if(!g.actionSkipSyncRe.test(g.action)){d=g.records;if(d&&d.length){if(d.length>1){h=new Ext.util.MixedCollection();h.addAll(b);for(c=d.length;c--;){a=d[c];e=h.findBy(function(j){var i=a.getId();if(i&&j.getId()===i){return true}return j.internalId===a.internalId});g.updateClientRecord(a,e)}}else{a=d[0];e=b[0];if(a.phantom||a.getId()===e.getId()){g.updateClientRecord(a,e)}}if(g.actionCommitRecordsRe.test(g.action)){for(c=d.length;c--;){d[c].commit()}}}}},updateClientRecord:function(a,b){if(a&&b){a.beginEdit();a.fields.each(function(c){if(c.persist){a.set(c.name,b.get(c.name))}});if(a.phantom){a.setId(b.getId())}a.endEdit(true)}},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var a=this.getResultSet();return this.records||(a?a.records:null)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!="read"}});Ext.define("Ext.data.Request",{action:undefined,params:undefined,method:"GET",url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define("Ext.data.ResultSet",{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define("Ext.data.SequentialIdGenerator",{extend:"Ext.data.IdGenerator",alias:"idgen.sequential",constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.prefix,""]},prefix:"",seed:1,generate:function(){var a=this,b=a.parts;b[1]=a.seed++;return b.join("")}});Ext.define("Ext.data.SortTypes",{singleton:true,none:function(a){return a},stripTagsRE:/<\/?[^>]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{sortType:a.none,type:"auto"},STRING:{convert:function(c){var b=this.useNull?null:"";return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseInt(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(b){return b!==undefined&&b!==null&&b!==""?parseFloat(String(b).replace(Ext.data.Types.stripRe,""),10):(this.useNull?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(b){if(this.useNull&&(b===undefined||b===null||b==="")){return null}return b===true||b==="true"||b==1},sortType:a.none,type:"bool"},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d=="timestamp"){return new Date(c*1000)}if(d=="time"){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:"date"}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.UuidGenerator",function(){var h=Math.pow(2,14),g=Math.pow(2,16),e=Math.pow(2,28),c=Math.pow(2,32);function a(k,j){var i=k.toString(16);if(i.length>j){i=i.substring(i.length-j)}else{if(i.length<j){i=Ext.String.leftPad(i,j,"0")}}return i}function d(k,j){var i=Math.random()*(j-k+1);return Math.floor(i)+k}function b(j){if(typeof(j)=="number"){var i=Math.floor(j/c);return{lo:Math.floor(j-i*c),hi:i}}return j}return{extend:"Ext.data.IdGenerator",alias:"idgen.uuid",id:"uuid",version:4,constructor:function(){var i=this;i.callParent(arguments);i.parts=[];i.init()},generate:function(){var j=this,k=j.parts,i=j.timestamp;k[0]=a(i.lo,8);k[1]=a(i.hi&65535,4);k[2]=a(((i.hi>>>16)&4095)|(j.version<<12),4);k[3]=a(128|((j.clockSeq>>>8)&63),2)+a(j.clockSeq&255,2);k[4]=a(j.salt.hi,4)+a(j.salt.lo,8);if(j.version==4){j.init()}else{++i.lo;if(i.lo>=c){i.lo=0;++i.hi}}return k.join("-").toLowerCase()},getRecId:function(i){return i.getId()},init:function(){var j=this,i,k;if(j.version==4){j.clockSeq=d(0,h-1);i=j.salt||(j.salt={});k=j.timestamp||(j.timestamp={});i.lo=d(0,c-1);i.hi=d(0,g-1);k.lo=d(0,c-1);k.hi=d(0,e-1)}else{j.salt=b(j.salt);j.timestamp=b(j.timestamp);j.salt.hi|=256}},reconfigure:function(i){Ext.apply(this,i);this.init()}}}());Ext.define("Ext.data.validations",{singleton:true,presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address",emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(a,b){if(b===undefined){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&d<c)||(a&&d>a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",primaryKey:"id",defaultReaderType:"json",statics:{create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}switch(a.type){case"belongsTo":return new Ext.data.association.BelongsTo(a);case"hasMany":return new Ext.data.association.HasMany(a);case"hasOne":return new Ext.data.association.HasOne(a);default:}}return a}},constructor:function(b){Ext.apply(this,b);var c=Ext.ModelManager.types,d=b.ownerModel,g=b.associatedModel,e=c[d],h=c[g],a;this.ownerModel=e;this.associatedModel=h;Ext.applyIf(this,{ownerName:d,associatedName:g})},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias("reader."+a.type,a)}return c.reader||null}});Ext.define("Ext.data.association.BelongsTo",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.BelongsToAssociation",alias:"association.belongsto",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"BelongsToInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var b=this,a=b.foreignKey;return function(e,c,d){if(e&&e.isModel){e=e.getId()}this.set(a,e);if(Ext.isFunction(c)){c={callback:c,scope:d||this}}if(Ext.isObject(c)){return this.save(c)}}},createGetter:function(){var d=this,e=d.associatedName,g=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(k,l){k=k||{};var j=this,m=j.get(c),n,h,i;if(k.reload===true||j[a]===undefined){h=Ext.ModelManager.create({},e);h.set(b,m);if(typeof k=="function"){k={callback:k,scope:l||j}}n=k.success;k.success=function(o){j[a]=o;if(n){n.call(this,arguments)}};g.load(m,k);j[a]=h;return h}else{h=j[a];i=[h];l=l||j;Ext.callback(k,l,i);Ext.callback(k.success,l,i);Ext.callback(k.failure,l,i);Ext.callback(k.callback,l,i);return h}}},read:function(b,a,c){b[this.instanceName]=a.read([c]).records[0]}});Ext.define("Ext.data.association.HasOne",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasOneAssociation",alias:"association.hasone",constructor:function(c){this.callParent(arguments);var e=this,a=e.ownerModel.prototype,g=e.associatedName,d=e.getterName||"get"+g,b=e.setterName||"set"+g;Ext.applyIf(e,{name:g,foreignKey:g.toLowerCase()+"_id",instanceName:g+"HasOneInstance",associationKey:g.toLowerCase()});a[d]=e.createGetter();a[b]=e.createSetter()},createSetter:function(){var b=this,c=b.ownerModel,a=b.foreignKey;return function(g,d,e){if(g&&g.isModel){g=g.getId()}this.set(a,g);if(Ext.isFunction(d)){d={callback:d,scope:e||this}}if(Ext.isObject(d)){return this.save(d)}}},createGetter:function(){var d=this,g=d.ownerModel,e=d.associatedName,h=d.associatedModel,c=d.foreignKey,b=d.primaryKey,a=d.instanceName;return function(l,m){l=l||{};var k=this,n=k.get(c),o,i,j;if(l.reload===true||k[a]===undefined){i=Ext.ModelManager.create({},e);i.set(b,n);if(typeof l=="function"){l={callback:l,scope:m||k}}o=l.success;l.success=function(p){k[a]=p;if(o){o.call(this,arguments)}};h.load(n,l);k[a]=i;return i}else{i=k[a];j=[i];m=m||k;Ext.callback(l,m,j);Ext.callback(l.success,m,j);Ext.callback(l.failure,m,j);Ext.callback(l.callback,m,j);return i}}},read:function(c,a,e){var b=this.associatedModel.prototype.associations.findBy(function(g){return g.type==="belongsTo"&&g.associatedName===c.$className}),d=a.read([e]).records[0];c[this.instanceName]=d;if(b){d[b.instanceName]=c}}});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],totalProperty:"total",successProperty:"success",root:"",implicitIncludes:true,isReader:true,constructor:function(a){var b=this;Ext.apply(b,a||{});b.fieldCount=0;b.model=Ext.ModelManager.getModel(a.model);if(b.model){b.buildExtractors()}},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&&b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b=a;if(a&&a.responseText){b=this.getResponseData(a)}if(b){return this.readRecords(b)}else{return this.nullResultSet}},readRecords:function(c){var d=this;if(d.fieldCount!==d.getFields().length){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);var i=true,b=0,a=[],g,e,h,j;if(d.successProperty){h=d.getSuccess(c);if(h===false||h==="false"){i=false}}if(d.messageProperty){j=d.getMessage(c)}if(i){g=Ext.isArray(c)?c:d.getRoot(c);if(g){e=g.length}if(d.totalProperty){h=parseInt(d.getTotal(c),10);if(!isNaN(h)){e=h}}if(g){a=d.extractData(g);b=a.length}}return new Ext.data.ResultSet({total:e||b,count:b,records:a,success:i,message:j})},extractData:function(o){var t=this,s=[],g=t.model,e=o.length,h=g.prototype.clientIdProperty,l=t.getFields(),q=l.length,a,c,b,u,n,k,d,r,p,m;if(!o.length&&Ext.isObject(o)){o=[o];e=1}for(r=0;r<e;r++){n=o[r];k=t.getId(n);d=new g(undefined,k,n,c={});d.phantom=false;for(p=0;p<q;p++){b=l[p];m=t.extractorFunctions[p](n);u=l[p].name;a=m;if(a===undefined){a=b.defaultValue}if(b.convert){a=b.convert(a,d)}c[u]=a}if(n[h]){d.internalId=n[h]}s.push(d);if(t.implicitIncludes){t.readAssociated(d,n)}}return s},readAssociated:function(h,e){var d=h.associations.items,g=0,a=d.length,c,b,k,j;for(;g<a;g++){c=d[g];b=this.getAssociatedDataRoot(e,c.associationKey||c.name);if(b){j=c.getReader();if(!j){k=c.associatedModel.proxy;if(k){j=k.getReader()}else{j=new this.constructor({model:c.associatedName})}}c.read(h,j,b)}}},getAssociatedDataRoot:function(b,a){return b[a]},getFields:function(){return this.model.prototype.fields.items},getData:function(a){return a},getRoot:function(a){return a},getResponseData:function(a){},onMetaChange:function(d){var a=d.fields,c=this,b;c.metaData=d;c.root=d.root||c.root;c.idProperty=d.idProperty||c.idProperty;c.totalProperty=d.totalProperty||c.totalProperty;c.successProperty=d.successProperty||c.successProperty;c.messageProperty=d.messageProperty||c.messageProperty;if(a){if(c.model){c.model.setFields(a);c.setModel(c.model,true)}else{b=Ext.define("Ext.data.reader.Json-Model"+Ext.id(),{extend:"Ext.data.Model",fields:a});if(c.idProperty){b.idProperty=c.idProperty}c.setModel(b,true)}}else{c.buildExtractors(true)}},getIdProperty:function(){return this.idProperty||this.model.prototype.idProperty},buildExtractors:function(b){var g=this,j=g.getIdProperty(),i=g.totalProperty,e=g.successProperty,h=g.messageProperty,d,c,a;if(b===true){delete g.extractorFunctions}if(g.extractorFunctions){return}if(i){g.getTotal=g.createAccessor(i)}if(e){g.getSuccess=g.createAccessor(e)}if(h){g.getMessage=g.createAccessor(h)}if(j){c=g.model.prototype.fields.get(j);if(c){a=c.mapping;j=(a!==undefined&&a!==null)?a:j}d=g.createAccessor(j);g.getId=function(k){var l=d.call(g,k);return(l===undefined||l==="")?null:l}}else{g.getId=function(){return null}}g.buildFieldExtractors()},buildFieldExtractors:function(){var d=this,a=d.getFields(),c=a.length,b=0,h=[],g,e;for(;b<c;b++){g=a[b];e=(g.mapping!==undefined&&g.mapping!==null)?g.mapping:g.name;h.push(d.createAccessor(e))}d.fieldCount=c;d.extractorFunctions=h}},function(){Ext.apply(this.prototype,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Xml",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a&&a.firstChild){return a.firstChild.nodeValue}return undefined},getResponseData:function(a){var b=a.responseXML;return b},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.root;if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.record;if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}this.xmlData=a;return this.callParent([a])}});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],writeAllFields:true,nameProperty:"name",constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,g=[];for(;d<a;d++){g.push(this.getRecordData(b[d],c))}return this.writeRecords(e,g)},getRecordData:function(g,d){var k=g.phantom===true,b=this.writeAllFields||k,c=this.nameProperty,h=g.fields,e={},j,a,i,l;if(b){h.each(function(m){if(m.persist){a=m[c]||m.name;e[a]=g.get(m.name)}})}else{j=g.getChanges();for(l in j){if(j.hasOwnProperty(l)){i=h.get(l);a=i[c]||i.name;e[a]=j[l]}}}if(k){if(d&&d.records.length>1){e[g.clientIdProperty]=g.internalId}}else{e[g.idProperty]=g.getId()}return e}});Ext.define("Ext.data.writer.Xml",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record",writeRecords:function(a,b){var h=this,d=[],c=0,g=b.length,j=h.documentRoot,e=h.record,m=b.length!==1,l,k;d.push(h.header||"");if(!j&&m){j=h.defaultDocumentRoot}if(j){d.push("<",j,">")}for(;c<g;++c){l=b[c];d.push("<",e,">");for(k in l){if(l.hasOwnProperty(k)){d.push("<",k,">",l[k],"</",k,">")}}d.push("</",e,">")}if(j){d.push("</",j,">")}a.xmlData=d.join("");return a}});Ext.define("Ext.direct.RemotingMethod",{constructor:function(b){var c=this,d=Ext.isDefined(b.params)?b.params:b.len,a;c.name=b.name;c.formHandler=b.formHandler;if(Ext.isNumber(d)){c.len=d;c.ordered=true}else{c.params=[];Ext.each(d,function(e){a=Ext.isObject(e)?e.name:e;c.params.push(a)})}},getCallData:function(c){var e=this,g=null,a=e.len,h=e.params,i,d,b;if(e.ordered){i=c[a];d=c[a+1];if(a!==0){g=c.slice(0,a)}}else{g=Ext.apply({},c[0]);i=c[1];d=c[2];for(b in g){if(g.hasOwnProperty(b)){if(!Ext.Array.contains(h,b)){delete g[b]}}}}return{data:g,callback:i,scope:d}}});Ext.define("Ext.direct.Transaction",{alias:"direct.transaction",alternateClassName:"Ext.Direct.Transaction",statics:{TRANSACTION_ID:0},constructor:function(a){var b=this;Ext.apply(b,a);b.id=b.tid=++b.self.TRANSACTION_ID;b.retryCount=0},send:function(){this.provider.queueTransaction(this)},retry:function(){this.retryCount++;this.send()},getProvider:function(){return this.provider}});Ext.define("Ext.draw.Color",{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var j=this,a=j.r/255,i=j.g/255,k=j.b/255,m=Math.max(a,i,k),d=Math.min(a,i,k),n=m-d,e,o=0,c=0.5*(m+d);if(d!=m){o=(c<0.5)?n/(m+d):n/(2-m-d);if(a==m){e=60*(i-k)/n}else{if(i==m){e=120+60*(k-a)/n}else{e=240+60*(a-i)/n}}if(e<0){e+=360}if(e>=360){e-=360}}return[e,o,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var h=this,c=Math.round,e=c(h.r).toString(16),d=c(h.g).toString(16),a=c(h.b).toString(16);e=(e.length==1)?"0"+e:e;d=(d.length==1)?"0"+d:d;a=(a.length==1)?"0"+a:a;return["#",e,d,a].join("")},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return""}if(b.substr(0,1)==="#"){return b}var e=this.colorToHexRe.exec(b);if(Ext.isArray(e)){var g=parseInt(e[2],10),d=parseInt(e[3],10),a=parseInt(e[4],10),c=a|(d<<8)|(g<<16);return e[1]+"#"+("000000"+c.toString(16)).slice(-6)}else{return b}},fromString:function(i){var c,e,d,a,h=parseInt;if((i.length==4||i.length==7)&&i.substr(0,1)==="#"){c=i.match(this.hexRe);if(c){e=h(c[1],16)>>0;d=h(c[2],16)>>0;a=h(c[3],16)>>0;if(i.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=i.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e=="undefined")?undefined:new Ext.draw.Color(e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(g,o,d){var a,b,c,e,k=[],n=Math.abs,j=Math.floor;if(o==0||g==null){k=[d,d,d]}else{g/=60;a=o*(1-n(2*d-1));b=a*(1-n(g-2*j(g/2)-1));c=d-a/2;switch(j(g)){case 0:k=[a,b,0];break;case 1:k=[b,a,0];break;case 2:k=[0,a,b];break;case 3:k=[0,b,a];break;case 4:k=[b,0,a];break;case 5:k=[a,0,b];break}k=[k[0]+c,k[1]+c,k[2]+c]}return new Ext.draw.Color(k[0]*255,k[1]*255,k[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define("Ext.draw.Draw",{singleton:true,requires:["Ext.draw.Color"],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:"along",blur:null,"clip-rect":"csv",cx:null,cy:null,fill:"color","fill-opacity":null,"font-size":null,height:null,opacity:null,path:"path",r:null,rotation:"csv",rx:null,ry:null,scale:"csv",stroke:"color","stroke-opacity":null,"stroke-width":null,translation:"csv",width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a=="object"&&b===Object(b))||(a=="undefined"&&typeof b==a)||(a=="null"&&b===null)||(a=="array"&&Array.isArray&&Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format("M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z",a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format("M{0},{1}l{2},0,0,{3},{4},0z",a.x,a.y,a.width,a.height,-a.width)}},path2string:function(){return this.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},pathToString:function(a){return a.join(",").replace(Ext.draw.Draw.pathToStringRE,"$1")},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,"array")&&b.is(a[0],"array")){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(g,e,j){var i=[],h=e.toLowerCase();j.replace(b.pathValuesRE,function(l,k){k&&i.push(+k)});if(h=="m"&&i.length>2){c.push([e].concat(Ext.Array.splice(i,0,2)));h="l";e=(e=="m")?"l":"L"}while(i.length>=d[h]){c.push([e].concat(Ext.Array.splice(i,0,d[h])));if(!d[h]){break}}})}c.toString=b.path2string;return c},mapPath:function(l,g){if(!g){return l}var h,e,c,k,a,d,b;l=this.path2curve(l);for(c=0,k=l.length;c<k;c++){b=l[c];for(a=1,d=b.length;a<d-1;a+=2){h=g.x(b[a],b[a+1]);e=g.y(b[a],b[a+1]);b[a]=h;b[a+1]=e}}return l},pathClone:function(g){var c=[],a,e,b,d;if(!this.is(g,"array")||!this.is(g&&g[0],"array")){g=this.parsePathString(g)}for(b=0,d=g.length;b<d;b++){c[b]=[];for(a=0,e=g[b].length;a<e;a++){c[b][a]=g[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(c){if(!this.is(c,"array")||!this.is(c&&c[0],"array")){c=this.parsePathString(c)}var k=[],m=0,l=0,o=0,n=0,g=0,h=c.length,b,d,e,a;if(h&&c[0][0]=="M"){m=+c[0][1];l=+c[0][2];o=m;n=l;g++;k[0]=["M",m,l]}for(;g<h;g++){b=k[g]=[];d=c[g];if(d[0]!=d[0].toUpperCase()){b[0]=d[0].toUpperCase();switch(b[0]){case"A":b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=+(d[6]+m);b[7]=+(d[7]+l);break;case"V":b[1]=+d[1]+l;break;case"H":b[1]=+d[1]+m;break;case"M":o=+d[1]+m;n=+d[2]+l;default:e=1;a=d.length;for(;e<a;e++){b[e]=+d[e]+((e%2)?m:l)}}}else{e=0;a=d.length;for(;e<a;e++){k[g][e]=d[e]}}switch(b[0]){case"Z":m=o;l=n;break;case"H":m=b[1];break;case"V":l=b[1];break;case"M":d=k[g];a=d.length;o=d[a-2];n=d[a-1];default:d=k[g];a=d.length;m=d[a-2];l=d[a-1]}}k.toString=this.path2string;return k},pathToRelative:function(d){if(!this.is(d,"array")||!this.is(d&&d[0],"array")){d=this.parsePathString(d)}var n=[],p=0,o=0,t=0,s=0,c=0;if(d[0][0]=="M"){p=d[0][1];o=d[0][2];t=p;s=o;c++;n.push(["M",p,o])}for(var h=c,u=d.length;h<u;h++){var a=n[h]=[],q=d[h];if(q[0]!=q[0].toLowerCase()){a[0]=q[0].toLowerCase();switch(a[0]){case"a":a[1]=q[1];a[2]=q[2];a[3]=q[3];a[4]=q[4];a[5]=q[5];a[6]=+(q[6]-p).toFixed(3);a[7]=+(q[7]-o).toFixed(3);break;case"v":a[1]=+(q[1]-o).toFixed(3);break;case"m":t=q[1];s=q[2];default:for(var g=1,l=q.length;g<l;g++){a[g]=+(q[g]-((g%2)?p:o)).toFixed(3)}}}else{a=n[h]=[];if(q[0]=="m"){t=q[1]+p;s=q[2]+o}for(var e=0,b=q.length;e<b;e++){n[h][e]=q[e]}}var m=n[h].length;switch(n[h][0]){case"z":p=t;o=s;break;case"h":p+=+n[h][m-1];break;case"v":o+=+n[h][m-1];break;default:p+=+n[h][m-2];o+=+n[h][m-1]}}n.toString=this.path2string;return n},path2curve:function(k){var d=this,h=d.pathToAbsolute(k),c=h.length,j={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,g,e;for(b=0;b<c;b++){h[b]=d.command2curve(h[b],j);if(h[b].length>7){h[b].shift();e=h[b];while(e.length){Ext.Array.splice(h,b++,0,["C"].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(h,b,1);c=h.length}a=h[b];g=a.length;j.x=a[g-2];j.y=a[g-1];j.bx=parseFloat(a[g-4])||j.x;j.by=parseFloat(a[g-3])||j.y}return h},interpolatePaths:function(r,l){var j=this,d=j.pathToAbsolute(r),m=j.pathToAbsolute(l),n={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,s){if(p[s].length>7){p[s].shift();var t=p[s];while(t.length){Ext.Array.splice(p,s++,0,["C"].concat(Ext.Array.splice(t,0,6)))}Ext.Array.erase(p,s,1);o=Math.max(d.length,m.length||0)}},c=function(v,u,s,p,t){if(v&&u&&v[t][0]=="M"&&u[t][0]!="M"){Ext.Array.splice(u,t,0,["M",p.x,p.y]);s.bx=0;s.by=0;s.x=v[t][1];s.y=v[t][2];o=Math.max(d.length,m.length||0)}};for(var h=0,o=Math.max(d.length,m.length||0);h<o;h++){d[h]=j.command2curve(d[h],n);b(d,h);(m[h]=j.command2curve(m[h],a));b(m,h);c(d,m,n,a,h);c(m,d,a,n,h);var g=d[h],q=m[h],e=g.length,k=q.length;n.x=g[e-2];n.y=g[e-1];n.bx=parseFloat(g[e-4])||n.x;n.by=parseFloat(g[e-3])||n.y;a.bx=(parseFloat(q[k-4])||a.x);a.by=(parseFloat(q[k-3])||a.y);a.x=q[k-2];a.y=q[k-1]}return[d,m]},command2curve:function(c,b){var a=this;if(!c){return["C",b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!="T"&&c[0]!="Q"){b.qx=b.qy=null}switch(c[0]){case"M":b.X=c[1];b.Y=c[2];break;case"A":c=["C"].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case"S":c=["C",b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=["C"].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case"Q":b.qx=c[1];b.qy=c[2];c=["C"].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case"L":c=["C"].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case"H":c=["C"].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case"V":c=["C"].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case"Z":c=["C"].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,h,e,a,c){var g=1/3,i=2/3;return[g*b+i*h,g*d+i*e,g*a+i*h,g*c+i*e,a,c]},rotate:function(b,h,a){var d=Math.cos(a),c=Math.sin(a),g=b*d-h*c,e=b*c+h*d;return{x:g,y:e}},arc2curve:function(v,ah,J,H,B,o,j,u,ag,C){var z=this,e=Math.PI,A=z.radian,G=e*120/180,b=A*(+B||0),O=[],L=Math,V=L.cos,a=L.sin,X=L.sqrt,w=L.abs,p=L.asin,K,c,r,Q,P,ac,d,T,W,E,D,n,m,s,l,af,g,ae,R,U,S,ad,ab,aa,Y,N,Z,M,F,I,q;if(!C){K=z.rotate(v,ah,-b);v=K.x;ah=K.y;K=z.rotate(u,ag,-b);u=K.x;ag=K.y;c=V(A*B);r=a(A*B);Q=(v-u)/2;P=(ah-ag)/2;ac=(Q*Q)/(J*J)+(P*P)/(H*H);if(ac>1){ac=X(ac);J=ac*J;H=ac*H}d=J*J;T=H*H;W=(o==j?-1:1)*X(w((d*T-d*P*P-T*Q*Q)/(d*P*P+T*Q*Q)));E=W*J*P/H+(v+u)/2;D=W*-H*Q/J+(ah+ag)/2;n=p(((ah-D)/H).toFixed(7));m=p(((ag-D)/H).toFixed(7));n=v<E?e-n:n;m=u<E?e-m:m;if(n<0){n=e*2+n}if(m<0){m=e*2+m}if(j&&n>m){n=n-e*2}if(!j&&m>n){m=m-e*2}}else{n=C[0];m=C[1];E=C[2];D=C[3]}s=m-n;if(w(s)>G){F=m;I=u;q=ag;m=n+G*(j&&m>n?1:-1);u=E+J*V(m);ag=D+H*a(m);O=z.arc2curve(u,ag,J,H,B,0,j,I,q,[m,F,E,D])}s=m-n;l=V(n);af=a(n);g=V(m);ae=a(m);R=L.tan(s/4);U=4/3*J*R;S=4/3*H*R;ad=[v,ah];ab=[v+U*af,ah-S*l];aa=[u+U*ae,ag-S*g];Y=[u,ag];ab[0]=2*ad[0]-ab[0];ab[1]=2*ad[1]-ab[1];if(C){return[ab,aa,Y].concat(O)}else{O=[ab,aa,Y].concat(O).join().split(",");N=[];M=O.length;for(Z=0;Z<M;Z++){N[Z]=Z%2?z.rotate(O[Z-1],O[Z],b).y:z.rotate(O[Z],O[Z+1],b).x}return N}},rotateAndTranslatePath:function(k){var c=k.rotation.degrees,d=k.rotation.x,b=k.rotation.y,o=k.translation.x,l=k.translation.y,n,g,a,m,e,h=[];if(!c&&!o&&!l){return this.pathToAbsolute(k.attr.path)}o=o||0;l=l||0;n=this.pathToAbsolute(k.attr.path);for(g=n.length;g--;){a=h[g]=n[g].slice();if(a[0]=="A"){m=this.rotatePoint(a[6],a[7],c,d,b);a[6]=m.x+o;a[7]=m.y+l}else{e=1;while(a[e+1]!=null){m=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=m.x+o;a[e+1]=m.y+l;e+=2}}}return h},rotatePoint:function(b,h,e,a,g){if(!e){return{x:b,y:h}}a=a||0;g=g||0;b=b-a;h=h-g;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-h*c+a,y:b*c+h*d+g}},pathDimensions:function(m){if(!m||!(m+"")){return{x:0,y:0,width:0,height:0}}m=this.path2curve(m);var k=0,j=0,d=[],b=[],e=0,h=m.length,c,a,l,g;for(;e<h;e++){c=m[e];if(c[0]=="M"){k=c[1];j=c[2];d.push(k);b.push(j)}else{g=this.curveDim(k,j,c[1],c[2],c[3],c[4],c[5],c[6]);d=d.concat(g.min.x,g.max.x);b=b.concat(g.min.y,g.max.y);k=c[5];j=c[6]}}a=Math.min.apply(0,d);l=Math.min.apply(0,b);return{x:a,y:l,path:m,width:Math.max.apply(0,d)-a,height:Math.max.apply(0,b)-l}},intersectInside:function(b,c,a){return(a[0]-c[0])*(b[1]-c[1])>(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(n,m,g,d){var c=[],b=g[0]-d[0],a=g[1]-d[1],k=n[0]-m[0],i=n[1]-m[1],l=g[0]*d[1]-g[1]*d[0],j=n[0]*m[1]-n[1]*m[0],h=1/(b*i-a*k);c[0]=(l*k-j*b)*h;c[1]=(l*i-j*a)*h;return c},intersect:function(o,c){var n=this,k=0,m=c.length,h=c[m-1],q=o,g,r,l,p,a,b,d;for(;k<m;++k){g=c[k];b=q;q=[];r=b[b.length-1];d=0;a=b.length;for(;d<a;d++){l=b[d];if(n.intersectInside(l,h,g)){if(!n.intersectInside(r,h,g)){q.push(n.intersectIntersection(r,l,h,g))}q.push(l)}else{if(n.intersectInside(r,h,g)){q.push(n.intersectIntersection(r,l,h,g))}}r=l}h=g}return q},curveDim:function(g,d,i,h,t,s,p,m){var r=(t-2*i+g)-(p-2*t+i),o=2*(i-g)-2*(t-i),l=g-i,k=(-o+Math.sqrt(o*o-4*r*l))/2/r,j=(-o-Math.sqrt(o*o-4*r*l))/2/r,n=[d,m],q=[g,p],e;if(Math.abs(k)>1000000000000){k=0.5}if(Math.abs(j)>1000000000000){j=0.5}if(k>0&&k<1){e=this.findDotAtSegment(g,d,i,h,t,s,p,m,k);q.push(e.x);n.push(e.y)}if(j>0&&j<1){e=this.findDotAtSegment(g,d,i,h,t,s,p,m,j);q.push(e.x);n.push(e.y)}r=(s-2*h+d)-(m-2*s+h);o=2*(h-d)-2*(s-h);l=d-h;k=(-o+Math.sqrt(o*o-4*r*l))/2/r;j=(-o-Math.sqrt(o*o-4*r*l))/2/r;if(Math.abs(k)>1000000000000){k=0.5}if(Math.abs(j)>1000000000000){j=0.5}if(k>0&&k<1){e=this.findDotAtSegment(g,d,i,h,t,s,p,m,k);q.push(e.x);n.push(e.y)}if(j>0&&j<1){e=this.findDotAtSegment(g,d,i,h,t,s,p,m,j);q.push(e.x);n.push(e.y)}return{min:{x:Math.min.apply(0,q),y:Math.min.apply(0,n)},max:{x:Math.max.apply(0,q),y:Math.max.apply(0,n)}}},getAnchors:function(e,d,k,j,v,u,q){q=q||4;var i=Math,p=i.PI,r=p/2,m=i.abs,a=i.sin,b=i.cos,g=i.atan,t,s,h,l,o,n,x,w,c;t=(k-e)/q;s=(v-k)/q;if((j>=d&&j>=u)||(j<=d&&j<=u)){h=l=r}else{h=g((k-e)/m(j-d));if(d<j){h=p-h}l=g((v-k)/m(j-u));if(u<j){l=p-l}}c=r-((h+l)%(p*2))/2;if(c>r){c-=p}h+=c;l+=c;o=k-t*a(h);n=j+t*b(h);x=k+s*a(l);w=j+s*b(l);if((j>d&&n<d)||(j<d&&n>d)){o+=m(d-n)*(o-k)/(n-j);n=d}if((j>u&&w<u)||(j<u&&w>u)){x-=m(u-w)*(x-k)/(w-j);w=u}return{x1:o,y1:n,x2:x,y2:w}},smooth:function(a,r){var q=this.path2curve(a),e=[q[0]],k=q[0][1],h=q[0][2],s,u,v=1,l=q.length,g=1,n=k,m=h,c=0,b=0;for(;v<l;v++){var A=q[v],z=A.length,w=q[v-1],o=w.length,t=q[v+1],p=t&&t.length;if(A[0]=="M"){n=A[1];m=A[2];s=v+1;while(q[s][0]!="C"){s++}c=q[s][5];b=q[s][6];e.push(["M",n,m]);g=e.length;k=n;h=m;continue}if(A[z-2]==n&&A[z-1]==m&&(!t||t[0]=="M")){var d=e[g].length;u=this.getAnchors(w[o-2],w[o-1],n,m,e[g][d-2],e[g][d-1],r);e[g][1]=u.x2;e[g][2]=u.y2}else{if(!t||t[0]=="M"){u={x1:A[z-2],y1:A[z-1]}}else{u=this.getAnchors(w[o-2],w[o-1],A[z-2],A[z-1],t[p-2],t[p-1],r)}}e.push(["C",k,h,u.x1,u.y1,A[z-2],A[z-1]]);k=u.x2;h=u.y2}return e},findDotAtSegment:function(b,a,d,c,j,i,h,g,k){var e=1-k;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*k*d+e*3*k*k*j+Math.pow(k,3)*h,y:Math.pow(e,3)*a+Math.pow(e,2)*3*k*c+e*3*k*k*i+Math.pow(k,3)*g}},snapEnds:function(r,s,d,n){if(Ext.isDate(r)){return this.snapEndsByDate(r,s,d)}var c=(s-r)/d,a=Math.floor(Math.log(c)/Math.LN10)+1,e=Math.pow(10,a),t,p=Math.round((c%e)*Math.pow(10,2-a)),b=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],h=0,q,k,j,g,l=1000000000,o=b.length;t=r=Math.floor(r/e)*e;if(n){for(j=0;j<o;j++){q=b[j][0];k=(q-p)<0?1000000:(q-p)/b[j][1];if(k<l){g=q;l=k}}c=Math.floor(c*Math.pow(10,-a))*Math.pow(10,a)+g*Math.pow(10,a-2);while(t<s){t+=c;h++}s=+t.toFixed(10)}else{h=d}return{from:r,to:s,power:a,step:c,steps:h}},snapEndsByDate:function(i,h,b,a){var d=false,g=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],c,e;Ext.each(g,function(k,j){for(c=0;c<k[1].length;c++){if(h<Ext.Date.add(i,k[0],k[1][c]*b)){d=[k[0],k[1][c]];return false}}});if(!d){e=this.snapEnds(i.getFullYear(),h.getFullYear()+1,b,a);d=[Date.YEAR,Math.round(e.step)]}return this.snapEndsByDateAndStep(i,h,d,a)},snapEndsByDateAndStep:function(i,h,e,a){var d=[i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),i.getMilliseconds()],b=0,g,c;if(a){g=i}else{switch(e[0]){case Ext.Date.MILLI:g=new Date(d[0],d[1],d[2],d[3],d[4],d[5],Math.floor(d[6]/e[1])*e[1]);break;case Ext.Date.SECOND:g=new Date(d[0],d[1],d[2],d[3],d[4],Math.floor(d[5]/e[1])*e[1],0);break;case Ext.Date.MINUTE:g=new Date(d[0],d[1],d[2],d[3],Math.floor(d[4]/e[1])*e[1],0,0);break;case Ext.Date.HOUR:g=new Date(d[0],d[1],d[2],Math.floor(d[3]/e[1])*e[1],0,0,0);break;case Ext.Date.DAY:g=new Date(d[0],d[1],Math.floor(d[2]-1/e[1])*e[1]+1,0,0,0,0);break;case Ext.Date.MONTH:g=new Date(d[0],Math.floor(d[1]/e[1])*e[1],1,0,0,0,0);break;default:g=new Date(Math.floor(d[0]/e[1])*e[1],0,1,0,0,0,0);break}}c=g;while(c<h){c=Ext.Date.add(c,e[0],e[1]);b++}if(a){c=h}return{from:+g,to:+c,step:(c-g)/b,steps:b}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a>=b.x&&a<=(b.x+b.width)&&c>=b.y&&c<=(b.y+b.height))},parseGradient:function(k){var e=this,g=k.type||"linear",c=k.angle||0,i=e.radian,l=k.stops,a=[],j,b,h,d;if(g=="linear"){b=[0,0,Math.cos(c*i),Math.sin(c*i)];h=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=h;b[3]*=h;if(b[2]<0){b[0]=-b[2];b[2]=0}if(b[3]<0){b[1]=-b[3];b[3]=0}}for(j in l){if(l.hasOwnProperty(j)&&e.stopsRE.test(j)){d={offset:parseInt(j,10),color:Ext.draw.Color.toHex(l[j].color)||"#ffffff",opacity:l[j].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(g=="linear"){return{id:k.id,type:g,vector:b,stops:a}}else{return{id:k.id,type:g,centerX:k.centerX,centerY:k.centerY,focalX:k.focalX,focalY:k.focalY,radius:k.radius,vector:b,stops:a}}}});Ext.define("Ext.draw.Matrix",{requires:["Ext.draw.Draw"],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q<3;q++){for(o=0;o<3;o++){j=0;for(l=0;l<3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(1,0,0,1,a,d);c.add(b,0,0,e,0,0);c.add(1,0,0,1,-a,-d)},rotate:function(c,b,h){c=Ext.draw.Draw.rad(c);var e=this,g=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(g,d,-d,g,b,h);e.add(1,0,0,1,-b,-h)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return"matrix("+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+")"},toFilter:function(){var a=this;return"progid:DXImageTransform.Microsoft.Matrix(M11="+a.get(0,0)+", M12="+a.get(0,1)+", M21="+a.get(1,0)+", M22="+a.get(1,1)+", Dx="+a.get(0,2)+", Dy="+a.get(1,2)+")"},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(g){return g[0]*g[0]+g[1]*g[1]}function b(g){var h=Math.sqrt(d(g));g[0]/=h;g[1]/=h}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][1],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&&(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define("Ext.draw.engine.ImageExporter",{singleton:true,statics:(function(){var d={"image/png":1,"image/jpeg":1},l=function(m){if(m.hasOwnProperty("width")){b=m.width}if(m.hasOwnProperty("height")){i=m.height}if(m.hasOwnProperty("type")&&d[m.type]){e=m.type}else{return false}if(k&&j&&a&&g&&h){return true}k=k||Ext.get(document.createElement("form"));k.set({action:"http://svg.sencha.io",method:"POST"});j=j||Ext.get(document.createElement("input"));j.set({name:"svg",type:"hidden"});a=a||Ext.get(document.createElement("input"));a.set({name:"type",type:"hidden"});g=g||Ext.get(document.createElement("input"));g.set({name:"width",type:"hidden"});h=h||Ext.get(document.createElement("input"));h.set({name:"height",type:"hidden"});k.appendChild(j);k.appendChild(a);k.appendChild(g);k.appendChild(h);Ext.getBody().appendChild(k);return true},c=function(m){var n=Ext.draw.engine.SvgExporter.self.generate({},m);if(b){g.set({value:b})}if(i){h.set({value:i})}if(e){a.set({value:e})}j.set({value:n});k.dom.submit()},k,a,j,g,h,e,b,i;return{generate:function(n,m){if(l(n)){c(m)}else{return false}}}})()});Ext.define("Ext.draw.engine.SvgExporter",{singleton:true,statics:(function(){var d,e,c,i,j=function(k){d=k;e=d.length,c=d.width,i=d.height},g={path:function(m){var k=m.attr,o=k.path,l="",n;if(Ext.isArray(o[0])){Ext.each(o,function(q){l+=q.join(" ")})}else{if(Ext.isArray(o)){l=o.join(" ")}else{l=o.replace(/,/g," ")}}n=b({d:l,fill:k.fill||"none",stroke:k.stroke,"fill-opacity":k.opacity,"stroke-width":k["stroke-width"],"stroke-opacity":k["stroke-opacity"],transform:m.matrix.toSvg()});return"<path "+n+"/>"},text:function(r){var o=r.attr,k=/(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)\s('*.*'*)/,n=k.exec(o.font),u=(n&&n[1])||"12",m=(n&&n[3])||"Arial",t=o.text,q=(Ext.isFF3_0||Ext.isFF3_5)?2:4,s=r.getBBox(),l="",p;l+='<tspan x="'+(o.x||"")+'" dy="';l+=(u/q)+'">';l+=Ext.htmlEncode(t)+"</tspan>";p=b({x:o.x,y:o.y,"font-size":u,"font-family":m,"font-weight":o["font-weight"],"text-anchor":o["text-anchor"],fill:o.fill||"#000","fill-opacity":o.opacity,transform:r.matrix.toSvg()});return"<text "+p+">"+l+"</text>"},rect:function(l){var k=l.attr,m=b({x:k.x,y:k.y,rx:k.rx,ry:k.ry,width:k.width,height:k.height,fill:k.fill||"none","fill-opacity":k.opacity,stroke:k.stroke,"stroke-opacity":k["stroke-opacity"],"stroke-width":k["stroke-width"],transform:l.matrix&&l.matrix.toSvg()});return"<rect "+m+"/>"},circle:function(l){var k=l.attr,m=b({cx:k.x,cy:k.y,r:k.radius,fill:k.translation.fill||k.fill||"none","fill-opacity":k.opacity,stroke:k.stroke,"stroke-opacity":k["stroke-opacity"],"stroke-width":k["stroke-width"],transform:l.matrix.toSvg()});return"<circle "+m+" />"},image:function(l){var k=l.attr,m=b({x:k.x-(k.width/2>>0),y:k.y-(k.height/2>>0),width:k.width,height:k.height,"xlink:href":k.src,transform:l.matrix.toSvg()});return"<image "+m+" />"}},a=function(){var k='<?xml version="1.0" standalone="yes"?>';k+='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';return k},h=function(){var r='<svg width="'+c+'px" height="'+i+'px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">',q="",x,m,t,v,n,k,w,s,p,u;t=d.items.items;m=t.length;s=function(C){var I=C.childNodes,F=I.length,y="",A,H,B,G;for(var E=0;E<F;E++){A=I[E],H=A.attributes,B=A.tagName;y+="<"+B;for(var z=0,D=H.length;z<D;z++){G=H.item(z);y+=" "+G.name+'="'+G.value+'"'}y+=">";if(A.childNodes.length>0){y+=s(A)}y+="</"+B+">"}return y};if(d.getDefs){q=s(d.getDefs())}else{d.gradientsColl&&d.gradientsColl.eachKey(function(z){v=d.gradientsColl.getByKey(z);q+='<linearGradient id="'+z+'" x1="0" y1="0" x2="1" y2="1">';p=v.colors.split(",");for(var y=0,o=p.length;y<o;y++){u=p[y].split(" ");q+='<stop offset="'+u[0]+'" stop-color="'+u[1]+'" stop-opacity="1"></stop>'}q+="</linearGradient>"})}r+="<defs>"+q+"</defs>";r+=g.rect({attr:{width:"100%",height:"100%",fill:"#fff",stroke:"none",opacity:"0"}});for(var l=0;l<m;l++){x=t[l];if(!x.attr.hidden){r+=g[x.type](x)}}r+="</svg>";return r},b=function(m){var l="";for(var k in m){if(m.hasOwnProperty(k)&&m[k]!=null){l+=k+'="'+m[k]+'" '}}return l};return{generate:function(l,k){j(k);return a()+h()}}})()});Ext.define("Ext.fx.CubicBezier",{singleton:true,cubicBezierAtTime:function(o,d,b,n,m,i){var j=3*d,l=3*(n-d)-j,a=1-j-l,h=3*b,k=3*(m-b)-h,p=1-h-k;function g(q){return((a*q+l)*q+j)*q}function c(q,s){var r=e(q,s);return((p*r+k)*r+h)*r}function e(q,y){var w,v,t,r,u,s;for(t=q,s=0;s<8;s++){r=g(t)-q;if(Math.abs(r)<y){return t}u=(3*a*t+2*l)*t+j;if(Math.abs(u)<0.000001){break}t=t-r/u}w=0;v=1;t=q;if(t<w){return w}if(t>v){return v}while(w<v){r=g(t);if(Math.abs(r-q)<y){return t}if(q>r){w=t}else{v=t}t=(v-w)/2+w}return t}return c(o,1/(200*i))},cubicBezier:function(b,e,a,c){var d=function(g){return Ext.fx.CubicBezier.cubicBezierAtTime(g,b,e,a,c,1)};d.toCSS3=function(){return"cubic-bezier("+[b,e,a,c].join(",")+")"};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.define("Ext.fx.PropertyHandler",{requires:["Ext.draw.Draw"],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(j,c,a,g,i){a=(typeof a=="number")?a:1;var h=this.unitRE,d=h.exec(j),b,e;if(d){j=d[1];e=d[2];if(!this.scrollRE.test(i)&&!e&&this.pixelDefaultsRE.test(i)){e="px"}}j=+j||0;d=h.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(g!=null)?g:j;return{from:j,delta:(c-b)*a,units:e}},get:function(o,b,a,n,k){var m=o.length,d=[],e,h,l,c,g;for(e=0;e<m;e++){if(n){h=n[e][1].from}if(Ext.isArray(o[e][1])&&Ext.isArray(b)){l=[];c=0;g=o[e][1].length;for(;c<g;c++){l.push(this.computeDelta(o[e][1][c],b[c],a,h,k))}d.push([o[e][0],l])}else{d.push([o[e][0],this.computeDelta(o[e][1],b,a,h,k)])}}return d},set:function(l,g){var h=l.length,c=[],d,a,k,e,b;for(d=0;d<h;d++){a=l[d][1];if(Ext.isArray(a)){k=[];b=0;e=a.length;for(;b<e;b++){k.push(a[b].from+(a[b].delta*g)+(a[b].units||0))}c.push([l[d][0],k])}else{c.push([l[d][0],a.from+(a.delta*g)+(a.units||0)])}}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(a,d){d=(typeof d=="number")?d:1;var e,c=false,b;Ext.each([this.hexRE,this.rgbRE,this.hex3RE],function(h,g){e=(g%2==0)?16:10;b=h.exec(a);if(b&&b.length==4){if(g==2){b[1]+=b[1];b[2]+=b[2];b[3]+=b[3]}c={red:parseInt(b[1],e),green:parseInt(b[2],e),blue:parseInt(b[3],e)};return false}});return c||a},computeDelta:function(h,a,e,c){h=this.parseColor(h);a=this.parseColor(a,e);var g=c?c:h,b=typeof g,d=typeof a;if(b=="string"||b=="undefined"||d=="string"||d=="undefined"){return a||g}return{from:h,delta:{red:Math.round((a.red-g.red)*e),green:Math.round((a.green-g.green)*e),blue:Math.round((a.blue-g.blue)*e)}}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(k,e){var g=k.length,c=[],d,b,a,h,j;for(d=0;d<g;d++){b=k[d][1];if(b){h=b.from;j=b.delta;b=(typeof b=="object"&&"red" in b)?"rgb("+b.red+", "+b.green+", "+b.blue+")":b;b=(typeof b=="object"&&b.length)?b[0]:b;if(typeof b=="undefined"){return[]}a=typeof b=="string"?b:"rgb("+[(h.red+Math.round(j.red*e))%256,(h.green+Math.round(j.green*e))%256,(h.blue+Math.round(j.blue*e))%256].join(",")+")";c.push([k[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b=="number")?b:1;var a={},c;for(c in d){a[c]=parseInt(d[c],10)*b}return a},computeDelta:function(h,a,c,b){h=this.interpolate(h);a=this.interpolate(a,c);var g=b?b:h,e={},d;for(d in a){e[d]=a[d]-g[d]}return{from:h,delta:e}},get:function(j,a,g,d){var h=j.length,c=[],e,b;for(e=0;e<h;e++){if(d){b=d[e][1].from}c.push([j[e][0],this.computeDelta(j[e][1],a,g,b)])}return c},set:function(l,g){var h=l.length,c=[],e={},d,j,k,b,a;for(d=0;d<h;d++){b=l[d][1];j=b.from;k=b.delta;for(a in j){e[a]=Math.round(j[a]+k[a]*g)}c.push([l[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c=="number")?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&&!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,l,a,q){var c=this.forcePath(l),n=[],s=b.length,d,h,o,g,p,m,e,t,r;for(o=0;o<s;o++){r=this.forcePath(b[o][1]);g=Ext.draw.Draw.interpolatePaths(r,c);r=g[0];c=g[1];d=r.length;t=[];for(m=0;m<d;m++){g=[r[m][0]];h=r[m].length;for(e=1;e<h;e++){p=q&&q[0][1][m][e].from;g.push(this.computeDelta(r[m][e],c[m][e],a,p))}t.push(g)}n.push([b[o][0],t])}return n},set:function(p,n){var o=p.length,e=[],h,g,d,l,m,c,a,b;for(h=0;h<o;h++){c=p[h][1];l=[];a=c.length;for(g=0;g<a;g++){m=[c[g][0]];b=c[g].length;for(d=1;d<b;d++){m.push(c[g][d].from+c[g][d].delta*n)}l.push(m.join(","))}e.push([p[h][0],l.join(",")])}return e}}}},function(){Ext.each(["outlineColor","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","fill","stroke"],function(a){this[a]=this.color},this)});Ext.define("Ext.fx.target.Target",{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define("Ext.layout.ClassList",function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{dirty:false,constructor:function(c){this.owner=c;this.map=a(this.classes=b(c.el.className))},add:function(c){var d=this;if(!d.map[c]){d.map[c]=true;d.classes.push(c);if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},addMany:function(c){Ext.each(b(c),this.add,this)},contains:function(c){return this.map[c]},flush:function(){this.owner.el.className=this.classes.join(" ");this.dirty=false},remove:function(c){var d=this;if(d.map[c]){delete d.map[c];d.classes=Ext.Array.filter(d.classes,function(e){return e!=c});if(!d.dirty){d.dirty=true;d.owner.markDirty()}}},removeMany:function(d){var e=this,c=a(b(d));e.classes=Ext.Array.filter(e.classes,function(g){if(!c[g]){return true}delete e.map[g];if(!e.dirty){e.dirty=true;e.owner.markDirty()}return false})}}}());Ext.define("Ext.layout.ContextItem",{requires:["Ext.layout.ClassList"],heightModel:null,widthModel:null,sizeModel:null,boxChildren:null,boxParent:null,cacheKey:null,children:[],dirty:null,dirtyCount:0,hasRawContent:true,isContextItem:true,isTopLevel:false,consumersContentHeight:0,consumersContentWidth:0,consumersContainerHeight:0,consumersContainerWidth:0,consumersHeight:0,consumersWidth:0,ownerCtContext:null,remainingChildLayouts:0,remainingComponentChildLayouts:0,remainingContainerChildLayouts:0,wrapsComponent:false,constructor:function(a){var d=this,e=a.target,c,b;Ext.apply(d,a);c=d.el;d.id=c.id;d.lastBox=c.lastBox;d.blocks={};d.domBlocks={};d.triggers={};d.domTriggers={};d.props={};d.state={};d.styles={};if(e.isComponent){d.wrapsComponent=true;d.cacheKey=e.$className+"|"+e.el.dom.className;d.sizeModel=b=e.getSizeModel(d.ownerCtContext&&d.ownerCtContext.sizeModel);d.widthModel=b.width;d.heightModel=b.height;if(e.isContainer){if(e.items.items.length||!e.getTargetEl().dom.firstChild){d.hasRawContent=false}}d.frameBodyContext=d.getEl("frameBody")}},init:function(c){var d=this,b,a;if(c){d.ownerCtContext=c;d.isBoxParent=d.target.ownerLayout.isItemBoxParent(d);a=d.widthModel;if(a.shrinkWrap){b=c.isBoxParent?c:c.boxParent;if(b){b.addBoxChild(d)}}else{if(a.natural){d.boxParent=c}}}else{d.isTopLevel=true}},initAnimatePolicy:function(){var b=this,c=b.target,a=b.ownerCtContext;if(a&&a.isTopLevel){b.animatePolicy=c.ownerLayout.getAnimatePolicy(b)}else{if(!a&&c.isCollapsingOrExpanding&&c.animCollapse){b.animatePolicy=c.componentLayout.getAnimatePolicy(b)}}if(b.animatePolicy){b.context.queueAnimation(b)}},noFraming:{left:0,top:0,right:0,bottom:0,width:0,height:0},addCls:function(a){this.getClassList().addMany(a)},removeCls:function(a){this.getClassList().removeMany(a)},addBlock:function(b,d,e){var c=this,g=c[b],a=g[e]||(g[e]={});if(!a[d.id]){a[d.id]=d;++d.blockCount;++c.context.blockCount}},addBoxChild:function(d){var c=this,b,a=d.widthModel;d.boxParent=this;d.measuresBox=a.shrinkWrap?d.hasRawContent:a.natural;if(d.measuresBox){b=c.boxChildren;if(b){b.push(d)}else{c.boxChildren=[d]}}},addTrigger:function(d,e){var c=this,g=e?c.domTriggers:c.triggers,b=c.context.currentLayout,a=g[d]||(g[d]={});if(!a[b.id]){a[b.id]=b;++b.triggerCount;if(c.props[d]!==undefined){if(!e||!(c.dirty&&(d in c.dirty))){++b.firedTriggers}}}return true},boxChildMeasured:function(){var b=this,c=b.state,a=(c.boxesMeasured=(c.boxesMeasured||0)+1);if(a==b.boxChildren.length){c.clearBoxWidth=1;++b.context.progressCount;b.markDirty()}},cacheMissHandlers:{borderInfo:function(a){var b={top:a.getStyle("border-top-width"),right:a.getStyle("border-right-width"),bottom:a.getStyle("border-bottom-width"),left:a.getStyle("border-left-width")};b.width=b.left+b.right;b.height=b.top+b.bottom;return b},marginInfo:function(a){var b={top:a.getStyle("margin-top"),right:a.getStyle("margin-right"),bottom:a.getStyle("margin-bottom"),left:a.getStyle("margin-left")};b.width=b.left+b.right;b.height=b.top+b.bottom;return b},paddingInfo:function(a){var b={top:a.getStyle("padding-top"),right:a.getStyle("padding-right"),bottom:a.getStyle("padding-bottom"),left:a.getStyle("padding-left")};b.width=b.left+b.right;b.height=b.top+b.bottom;return b}},checkCache:function(d){var c=this,e=c.cacheKey,g,a,b;b=c.cacheMissHandlers[d](c);return b},clearAllBlocks:function(a){var c=this[a],b;if(c){for(b in c){this.clearBlocks(a,b)}}},clearBlocks:function(c,g){var h=this[c],b=h&&h[g],d,e,a;if(b){delete h[g];d=this.context;for(a in b){e=b[a];--d.blockCount;if(!--e.blockCount&&!e.pending&&!e.done){d.queueLayout(e)}}}},block:function(a,b){this.addBlock("blocks",a,b)},domBlock:function(a,b){this.addBlock("domBlocks",a,b)},doInvalidate:function(c){var d=this,b=d.props,a=d.dirty,e=d.target.ownerLayout;delete d.dirty;d.props={};d.state={};d.clearAllBlocks("blocks");d.clearAllBlocks("domBlocks");if(d.wrapsComponent&&!c){d.recoverProp("x",b,a);d.recoverProp("y",b,a);if(d.widthModel.calculated){d.recoverProp("width",b,a)}if(d.heightModel.calculated){d.recoverProp("height",b,a)}}if(e&&e.manageMargins){d.recoverProp("margin-top",b,a);d.recoverProp("margin-right",b,a);d.recoverProp("margin-bottom",b,a);d.recoverProp("margin-left",b,a)}},fireTriggers:function(b,g){var d=this[b][g],c=this.context,e,a;if(d){for(a in d){e=d[a];++e.firedTriggers;if(!e.done&&!e.blockCount&&!e.pending){c.queueLayout(e)}}}},flush:function(){var b=this,a=b.dirty,c=b.state,d=b.target,e=b.el;b.dirtyCount=0;if(b.classList&&b.classList.dirty){b.classList.flush()}if("attributes" in b){e.set(b.attributes);delete b.attributes}if("innerHTML" in b){e.innerHTML=b.innerHTML;delete b.innerHTML}if(c.clearBoxWidth){c.clearBoxWidth=0;b.el.setStyle("width",null);if(!--c.blocks){b.context.queueItemLayouts(b)}}if(a){delete b.dirty;b.writeProps(a)}},flushAnimations:function(){var o=this,c=o.lastBox,l,n,e,h,g,d,i,m,k,a,b;if(c){l=o.target;n=l.layout&&l.layout.animate;if(n){e=Ext.isNumber(n)?n:n.duration}h=Ext.Object.getKeys(o.animatePolicy);g=Ext.apply({},{from:{},to:{},duration:e||Ext.fx.Anim.prototype.duration},n);for(d=0,i=0,m=h.length;i<m;i++){k=h[i];a=c[k];b=o.peek(k);if(a!=b){k=o.translateProps[k]||k;g.from[k]=a;g.to[k]=b;++d}}if(d){if(o.isCollapsingOrExpanding===1){l.componentLayout.undoLayout(o)}else{o.writeProps(g.from,true)}o.el.animate(g);Ext.fx.Manager.getFxQueue(o.el.id)[0].on({afteranimate:function(){if(o.isCollapsingOrExpanding===1){l.componentLayout.redoLayout(o);l.afterCollapse(true)}else{if(o.isCollapsingOrExpanding===2){l.afterExpand(true)}}}})}}},getBorderInfo:function(){var a=this,b=a.borderInfo;if(!b){a.borderInfo=b=a.checkCache("borderInfo")}return b},getClassList:function(){return this.classList||(this.classList=new Ext.layout.ClassList(this))},getEl:function(c,a){var e=this,g,d,b;if(c){if(c.dom){d=c}else{g=e.target;if(a){g=a}d=g[c];if(typeof d=="function"){d=d.call(g);if(d===e.el){return this}}}if(d){b=e.context.getEl(e,d)}}return b||null},getFraming:function(){var a=this;if(!a.framingInfo){a.framingInfo=a.target.frameSize||a.noFraming}return a.framingInfo},getFrameInfo:function(){var b=this,d=b.frameInfo,e,c,a;if(!d){e=b.getFraming();a=b.getBorderInfo();b.frameInfo=d={top:e.top+a.top,right:e.right+a.right,bottom:e.bottom+a.bottom,left:e.left+a.left,width:e.width+a.width,height:e.height+a.height}}return d},getMarginInfo:function(){var d=this,h=d.marginInfo,b,a,g,e,c;if(!h){if(!d.wrapsComponent){h=d.checkCache("marginInfo")}else{b=d.target;e=b.ownerLayout;c=e?e.id:null;a=e&&e.manageMargins;h=b.margin$;if(h&&h.ownerId!==c){h=null}if(!h){h=d.parseMargins(b.margin);if(!h){h=d.checkCache("marginInfo");if(a){g=d.parseMargins(b.margins,e.defaultMargins);if(g){h={top:h.top+g.top,right:h.right+g.right,bottom:h.bottom+g.bottom,left:h.left+g.left}}}}if(a){d.setProp("margin-top",0);d.setProp("margin-right",0);d.setProp("margin-bottom",0);d.setProp("margin-left",0)}h.ownerId=c;b.margin$=h}h.width=h.left+h.right;h.height=h.top+h.bottom}d.marginInfo=h}return h},getPaddingInfo:function(){var a=this,b=a.paddingInfo;if(!b){a.paddingInfo=b=a.checkCache("paddingInfo")}return b},getProp:function(c){var b=this,a=b.props[c];b.addTrigger(c);return a},getDomProp:function(c){var b=this,a=(b.dirty&&(c in b.dirty))?undefined:b.props[c];b.addTrigger(c,true);return a},getStyle:function(a){var c=this,b=c.styles,e,d;if(a in b){d=b[a]}else{e=c.styleInfo[a];d=c.el.getStyle(a);if(e&&e.parseInt){d=parseInt(d,10)||0}b[a]=d}return d},hasProp:function(b){var a=this.getProp(b);return typeof a!="undefined"},hasDomProp:function(b){var a=this.getDomProp(b);return typeof a!="undefined"},invalidate:function(a){this.context.queueInvalidate(this,a)},markDirty:function(){if(++this.dirtyCount==1){this.context.queueFlush(this)}},onBoxMeasured:function(){var a=this.boxParent,b=this.state;if(a&&a.widthModel.shrinkWrap&&!b.boxMeasured&&this.measuresBox){b.boxMeasured=1;a.boxChildMeasured()}},parseMargins:function(d,c){if(d===true){d=5}var b=typeof d,a;if(b=="string"||b=="number"){a=Ext.util.Format.parseBox(d)}else{if(d||c){a={top:0,right:0,bottom:0,left:0};Ext.apply(a,c);Ext.apply(a,d)}}return a},peek:function(a){return this.props[a]},recoverProp:function(g,b,a){var e=this,d=e.props,c;if(g in b){d[g]=b[g];if(a&&g in a){c=e.dirty||(e.dirty={});c[g]=a[g]}}},redo:function(b){var e=this,c,a,d;e.writeProps(e.props,true);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].redo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].redo()}}},setAttribute:function(a,c){var b=this;if(!b.attributes){b.attributes={}}b.attributes[a]=c;b.markDirty()},setBox:function(b){var a=this;if("left" in b){a.setProp("x",b.left)}if("top" in b){a.setProp("y",b.top)}a.setSize(b.width,b.height)},setContentHeight:function(a,b){if(!b&&this.hasRawContent){return 1}return this.setProp("contentHeight",a)},setContentWidth:function(b,a){if(!a&&this.hasRawContent){return 1}return this.setProp("contentWidth",b)},setContentSize:function(c,a,b){return this.setContentWidth(c,b)+this.setContentHeight(a,b)==2},setProp:function(d,c,a){var b=this,g=typeof c,e;if(g=="undefined"||(g==="number"&&isNaN(c))){return 0}if(b.props[d]===c){return 1}b.props[d]=c;++b.context.progressCount;if(a===false){b.fireTriggers("domTriggers",d);b.clearBlocks("domBlocks",d)}else{e=b.styleInfo[d];if(e){if(!b.dirty){b.dirty={}}if(d=="width"||d=="height"){if(b.isBorderBoxValue==null){b.isBorderBoxValue=!!b.el.isBorderBox()}if(!b.isBorderBoxValue){b.borderInfo||b.getBorderInfo();b.paddingInfo||b.getPaddingInfo()}}b.dirty[d]=c;b.markDirty()}}b.fireTriggers("triggers",d);b.clearBlocks("blocks",d);return 1},setHeight:function(a,c){var e=this,b=e.target,h,d,g;if(a<0){a=0}if(!e.wrapsComponent){if(!e.setProp("height",a,c)){return NaN}}else{a=Ext.Number.constrain(a,b.minHeight||0,b.maxHeight);if(!e.setProp("height",a,c)){return NaN}h=e.frameBodyContext;if(h){d=e.getFrameInfo();g=e.getPaddingInfo();h.setHeight(a-d.height-g.height,c)}}return a},setWidth:function(c,b){var e=this,a=e.target,h,d,g;if(c<0){c=0}if(!e.wrapsComponent){if(e.setProp("width",c,b)){return NaN}}else{c=Ext.Number.constrain(c,a.minWidth||0,a.maxWidth);if(!e.setProp("width",c,b)){return NaN}h=e.frameBodyContext;if(h){d=e.getFrameInfo();g=e.getPaddingInfo();h.setWidth(c-d.width-g.width,b)}}return c},setSize:function(b,a){this.setWidth(b);this.setHeight(a)},translateProps:{x:"left",y:"top"},undo:function(b){var e=this,c,a,d;e.writeProps(e.lastBox,true);if(b&&e.wrapsComponent){if(e.childItems){for(d=0,c=e.childItems,a=c.length;d<a;d++){c[d].undo(b)}}for(d=0,c=e.children,a=c.length;d<a;d++){c[d].undo()}}},unsetProp:function(b){var a=this.dirty;delete this.props[b];if(a){delete a[b]}},writeProps:function(c,q){if(!(c&&typeof c=="object")){return}var s=this,b=s.el,e={},d=0,a=s.styleInfo,r,k,m,j="x" in c,i="y" in c,h=c.x,g=c.y,n=c.width,l=c.height,p=s.isBorderBoxValue,t=s.target,o=Math.max;if("displayed" in c){b.setDisplayed(c.displayed)}for(k in c){if(!q){s.fireTriggers("domTriggers",k);s.clearBlocks("domBlocks",k)}r=a[k];if(r&&r.dom){if(r.suffix&&(m=parseInt(c[k],10))){e[k]=m+r.suffix}else{e[k]=c[k]}++d}}if(j||i){if(t.isComponent){t.setPosition(h||s.props.x,g||s.props.y)}else{if(j){e.left=h+"px";++d}if(i){e.top=g+"px";++d}}}if(!p&&(n>0||l>0)){if(n){n=o(parseInt(n,10)-(s.borderInfo.width+s.paddingInfo.width),0);e.width=n+"px";++d}if(l){l=o(parseInt(l,10)-(s.borderInfo.height+s.paddingInfo.height),0);e.height=l+"px";++d}}if(d){b.setStyle(e)}}},function(){var c={dom:true,parseInt:true,suffix:"px"},b={dom:true},a={dom:false};this.prototype.styleInfo={childrenDone:a,componentChildrenDone:a,containerChildrenDone:a,displayed:a,done:a,x:a,y:a,left:c,top:c,right:c,bottom:c,width:c,height:c,"border-top-width":c,"border-right-width":c,"border-bottom-width":c,"border-left-width":c,"margin-top":c,"margin-right":c,"margin-bottom":c,"margin-left":c,"padding-top":c,"padding-right":c,"padding-bottom":c,"padding-left":c,"line-height":b,display:b}});Ext.define("Ext.util.Bindable",{bindStore:function(a,b){var c=this,d=c.store;if(!b&&c.store){if(a!==d&&d.autoDestroy){d.destroyStore()}else{c.unbindStoreListeners(d)}c.onUnbindStore(d,b)}if(a){a=Ext.data.StoreManager.lookup(a);c.bindStoreListeners(a);c.onBindStore(a,b)}c.store=a||null;return c},getStore:function(){return this.store},unbindStoreListeners:function(a){var b=this.storeListeners;if(b){a.un(b)}},bindStoreListeners:function(a){var c=this,b=Ext.apply({},c.getStoreListeners());if(!b.scope){b.scope=c}c.storeListeners=b;a.on(b)},getStoreListeners:Ext.emptyFn,onUnbindStore:Ext.emptyFn,onBindStore:Ext.emptyFn});Ext.define("Ext.util.ElementContainer",{childEls:[],constructor:function(){var b=this,a;if(b.hasOwnProperty("childEls")){a=b.childEls;delete b.childEls;b.addChildEls.apply(b,a)}},destroy:function(){var e=this,d=e.getChildEls(),g,a,c,b;for(c=d.length;c--;){a=d[c];if(typeof a!="string"){a=a.name}g=e[a];if(g){e[a]=null;g.remove()}}},addChildEls:function(){var b=this,a=arguments;if(b.hasOwnProperty("childEls")){b.childEls.push.apply(b.childEls,a)}else{b.childEls=b.getChildEls().concat(Array.prototype.slice.call(a))}b.prune(b.childEls,false)},applyChildEls:function(b,a){var e=this,g=e.getChildEls(),j,k,d,c,h;j=(a||e.id)+"-";for(d=g.length;d--;){k=g[d];if(typeof k=="string"){h=b.getById(j+k)}else{if((c=k.select)){h=Ext.select(c,true,b.dom)}else{if((c=k.selectNode)){h=Ext.get(Ext.DomQuery.selectNode(c,b.dom))}else{h=b.getById(k.id||(j+k.itemId))}}k=k.name}e[k]=h}},getChildEls:function(){var b=this,a;if(b.hasOwnProperty("childEls")){return b.childEls}a=b.self;return a.$childEls||b.getClassChildEls(a)},getClassChildEls:function(o){var k=this,p=o.$childEls,m,d,b,j,n,h,a,c,e,g,l;if(!p){g=o.superclass;if(g){g=g.self;c=[g.$childEls||k.getClassChildEls(g)];l=g.prototype.mixins||{}}else{c=[];l={}}e=o.prototype;h=e.mixins;for(a in h){if(h.hasOwnProperty(a)&&!l.hasOwnProperty(a)){n=h[a].self;c.push(n.$childEls||k.getClassChildEls(n))}}c.push(e.hasOwnProperty("childEls")&&e.childEls);for(d=0,b=c.length;d<b;++d){m=c[d];if(m&&m.length){if(!p){p=m}else{if(!j){j=true;p=p.slice(0)}p.push.apply(p,m)}}}o.$childEls=p=(p?k.prune(p,!j):[])}return p},prune:function(c,e){var b=c.length,d={},a;while(b--){a=c[b];if(typeof a!="string"){a=a.name}if(!d[a]){d[a]=1}else{if(e){e=false;c=c.slice(0)}Ext.Array.erase(c,b,1)}}return c},removeChildEls:function(g){var e=this,a=e.getChildEls(),d=(e.childEls=[]),h,b,c;for(b=0,h=a.length;b<h;++b){c=a[b];if(!g(c)){d.push(c)}}}});Ext.define("Ext.util.Filter",{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,g=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(g===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(g){if(this.isTransnumeral(g)){return g}var e=this.plurals,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},singularize:function(g){if(this.isTransnumeral(g)){return g}var e=this.singulars,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==g||(c.test&&c.test(g))){return g.replace(c,a[1])}}return g},classify:function(a){return Ext.String.capitalize(this.singularize(a))},ordinalize:function(d){var b=parseInt(d,10),c=b%10,a=b%100;if(11<=a&&a<=13){return d+"th"}else{switch(c){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd";default:return d+"th"}}}},function(){var b={alumnus:"alumni",cactus:"cacti",focus:"foci",nucleus:"nuclei",radius:"radii",stimulus:"stimuli",ellipsis:"ellipses",paralysis:"paralyses",oasis:"oases",appendix:"appendices",index:"indexes",beau:"beaux",bureau:"bureaux",tableau:"tableaux",woman:"women",child:"children",man:"men",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",phenomenon:"phenomena",foot:"feet",goose:"geese",tooth:"teeth",antenna:"antennae",formula:"formulae",nebula:"nebulae",vertebra:"vertebrae",vita:"vitae"},a;for(a in b){this.plural(a,b[a]);this.singular(b[a],a)}});Ext.define("Ext.util.Memento",function(){function d(i,h,j,g){i[g?g+j:j]=h[j]}function c(h,g,i){delete h[i]}function e(k,j,l,i){var g=i?i+l:l,h=k[g];if(h||k.hasOwnProperty(g)){a(j,l,h)}}function a(h,i,g){if(Ext.isDefined(g)){h[i]=g}else{delete h[i]}}function b(g,k,j,h,i){if(k){if(Ext.isArray(h)){Ext.each(h,function(l){g(k,j,l,i)})}else{g(k,j,h,i)}}}return{data:null,target:null,constructor:function(h,g){if(h){this.target=h;if(g){this.capture(g)}}},capture:function(g,j,i){var h=this;b(d,h.data||(h.data={}),j||h.target,g,i)},remove:function(g){b(c,this.data,null,g)},restore:function(h,g,j,i){b(e,this.data,j||this.target,h,i);if(g!==false){this.remove(h)}},restoreAll:function(g,j){var i=this,h=j||this.target;Ext.Object.each(i.data,function(l,k){a(h,l,k)});if(g!==false){delete i.data}}}}());Ext.define("Ext.util.Observable",{requires:["Ext.util.Event"],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}return a}}},isObservable:true,constructor:function(a){var b=this;Ext.apply(b,a);b.events=b.events||{};if(b.listeners){b.on(b.listeners);b.listeners=null}if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(i,d,g,e,c){var h=this,a=h.managedListeners=h.managedListeners||[],b;if(typeof d!=="string"){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!h.eventOptionsRe.test(d)){h.addManagedListener(i,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:i,ename:d,fn:g,scope:e,options:c});i.on(d,g,e,c)}},removeManagedListener:function(j,c,g,k){var e=this,l,b,h,a,d;if(typeof c!=="string"){l=c;for(c in l){if(l.hasOwnProperty(c)){b=l[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(j,c,b.fn||b,b.scope||l.scope)}}}}h=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=h.length;d<a;d++){e.removeManagedListenerItem(false,h[d],j,c,g,k)}},fireEvent:function(b){var c=b.toLowerCase(),d=this.events,e=d&&d[c],a=e&&e.bubble;return this.continueFireEvent(c,Ext.Array.slice(arguments,1),a)},continueFireEvent:function(c,e,b){var h=this,a,g,d=true;do{if(h.eventsSuspended===true){if((a=h.eventQueue)){a.push([c,e,b])}return d}else{g=h.events[c];if(g&&g!=true){if((d=g.fire.apply(g,e))===false){break}}}}while(b&&(h=h.getBubbleParent()));return d},getBubbleParent:function(){var b=this,a=b.getBubbleTarget&&b.getBubbleTarget();if(a&&a.isObservable){return a}return null},addListener:function(c,e,d,b){var h=this,a,g;if(typeof c!=="string"){b=c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(!h.eventOptionsRe.test(c)){h.addListener(c,a.fn||a,a.scope||b.scope,a.fn?a:b)}}}}else{c=c.toLowerCase();h.events[c]=h.events[c]||true;g=h.events[c]||true;if(Ext.isBoolean(g)){h.events[c]=g=new Ext.util.Event(h,c)}g.addListener(e,d,Ext.isObject(b)?b:{})}},removeListener:function(c,e,d){var h=this,b,g,a;if(typeof c!=="string"){a=c;for(c in a){if(a.hasOwnProperty(c)){b=a[c];if(!h.eventOptionsRe.test(c)){h.removeListener(c,b.fn||b,b.scope||a.scope)}}}}else{c=c.toLowerCase();g=h.events[c];if(g&&g.isEvent){g.removeListener(e,d)}}},clearListeners:function(){var b=this.events,c,a;for(a in b){if(b.hasOwnProperty(a)){c=b[a];if(c.isEvent){c.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var b=this.managedListeners||[],c=0,a=b.length;for(;c<a;c++){this.removeManagedListenerItem(true,b[c])}this.managedListeners=[]},removeManagedListenerItem:function(b,a,g,c,e,d){if(b||(a.item===g&&a.ename===c&&(!e||a.fn===e)&&(!d||a.scope===d))){a.item.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(this.managedListeners,a)}}},addEvents:function(g){var e=this,d=e.events||(e.events={}),a,b,c;if(typeof g=="string"){for(b=arguments,c=b.length;c--;){a=b[c];if(!d[a]){d[a]=true}}}else{Ext.applyIf(e.events,g)}},hasListener:function(a){var b=this.events[a.toLowerCase()];return b&&b.isEvent===true&&b.listeners.length>0},suspendEvents:function(a){this.eventsSuspended=true;if(a&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,b=a.eventQueue;a.eventsSuspended=false;delete a.eventQueue;if(b){Ext.each(b,function(c){a.continueFireEvent.apply(a,c)})}},relayEvents:function(c,e,j){j=j||"";var h=this,a=e.length,d=0,g,b;for(;d<a;d++){g=e[d];b=j+g;h.events[b]=h.events[b]||true;c.on(g,h.createRelayer(b))}},createRelayer:function(a){var b=this;return function(){return b.fireEvent.apply(b,[a].concat(Array.prototype.slice.call(arguments,0,-1)))}},enableBubble:function(j){if(j){var g=this,h=(typeof j=="string")?arguments:j,e=h.length,c=g.events,b,d,a;for(a=0;a<e;++a){b=h[a].toLowerCase();d=c[b];if(!d||typeof d=="boolean"){c[b]=d=new Ext.util.Event(g,b)}d.bubble=true}}}},function(){this.createAlias({on:"addListener",un:"removeListener",mon:"addManagedListener",mun:"removeManagedListener"});this.observeClass=this.observe;Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if((c=l.apply(k||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var l=Array.prototype.slice.call(arguments,0),k,m,e;d=c=undefined;g=false;for(m=0,e=i.before.length;m<e;m++){k=i.before[m];b(k.fn,k.scope,l);if(g){return d}}if((c=i.originalFn.apply(h,l))!==undefined){d=c}for(m=0,e=i.after.length;m<e;m++){k=i.after[m];b(k.fn,k.scope,l);if(g){return d}}return d}}return i}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(j,g,d){var h=this.getMethodEvent(j),c,b;for(c=0,b=h.before.length;c<b;c++){if(h.before[c].fn==g&&h.before[c].scope==d){Ext.Array.erase(h.before,c,1);return}}for(c=0,b=h.after.length;c<b;c++){if(h.after[c].fn==g&&h.after[c].scope==d){Ext.Array.erase(h.after,c,1);return}}},toggleEventLogging:function(b){Ext.util.Observable[b?"capture":"releaseCapture"](this,function(c){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(c,arguments)}})}}}())});Ext.define("Ext.util.Offset",{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&&!isNaN(a))?a:0;this.y=(b!=null&&!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return"Offset["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&&this.y==0}});Ext.define("Ext.util.ProtoElement",function(){var b=Ext.String.splitWords,a=Ext.Array.toMap;return{clsProp:"cls",styleProp:"style",styleIsText:false,constructor:function(c){var d=this;Ext.apply(d,c);d.classList=b(d.cls);d.classMap=a(d.classList);if(Ext.isFunction(d.style)){d.styleFn=d.style;delete d.style}else{if(typeof d.style=="string"){d.style=Ext.Element.parseStyles(d.style)}else{if(d.style){d.style=Ext.apply({},d.style)}}}delete d.cls},addCls:function(d){var h=this,l=b(d),g=l.length,j=h.classList,k=h.classMap,e,m;for(e=0;e<g;++e){m=l[e];if(!k[m]){k[m]=true;j.push(m)}}return h},hasCls:function(c){return c in this.classMap},removeCls:function(n){var m=this,k=m.classList,g=(m.classList=[]),j=a(b(n)),e=k.length,d=m.classMap,h,l;for(h=0;h<e;++h){l=k[h];if(j[l]){delete d[l]}else{g.push(l)}}return m},setStyle:function(g,e){var d=this,c=d.style||(d.style={});if(typeof g=="string"){if(arguments.length===1){d.setStyle(Ext.Element.parseStyles(g))}else{c[g]=e}}else{Ext.apply(c,g)}return d},writeTo:function(e){var d=this,c;if(d.styleFn){c=Ext.apply({},d.styleFn());Ext.apply(c,d.style)}else{c=d.style}e[d.clsProp]=d.classList.join(" ");if(c){e[d.styleProp]=d.styleIsText?Ext.DomHelper.generateStyles(c):c}return e}}}());Ext.define("Ext.util.Queue",{constructor:function(){this.clear()},add:function(c){var b=this,a=b.getKey(c);if(!b.map[a]){++b.length;b.items.push(c);b.map[a]=c}return c},clear:function(){var b=this,a=b.items;b.items=[];b.map={};b.length=0;return a},contains:function(b){var a=this.getKey(b);return this.map.hasOwnProperty(a)},getCount:function(){return this.length},getKey:function(a){return a.id},remove:function(e){var d=this,c=d.getKey(e),a=d.items,b;if(d.map[c]){b=Ext.Array.indexOf(a,e);Ext.Array.erase(a,b,1);delete d.map[c];--d.length}return e}});Ext.define("Ext.util.Region",{requires:["Ext.util.Offset"],statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,g,a,c){var e=this;e.y=e.top=e[1]=d;e.right=g;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x>=a.x&&b.right<=a.right&&b.y>=a.y&&b.bottom<=a.bottom)},intersect:function(h){var g=this,d=Math.max(g.y,h.y),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.x,h.x);if(a>d&&e>c){return new this.self(d,e,a,c)}else{return false}},union:function(h){var g=this,d=Math.min(g.y,h.y),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.x,h.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,g,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=g;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.x){return this.x-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.y){return this.y-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a<this.x||a>this.right)},isOutOfBoundY:function(a){return(a<this.y||a>this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.x){b-=(b-this.x)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.y){b-=(b-this.y)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.util.Renderable",{requires:["Ext.dom.Element"],frameCls:Ext.baseCSSPrefix+"frame",frameIdRegex:/[\-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameTpl:["{%this.renderDockedItems(out,values,0);%}",'<tpl if="top">','<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>",'<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</div>",'<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>','<tpl if="bottom">','<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>','<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>','<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>','<tpl if="right"></div></tpl>','<tpl if="left"></div></tpl>',"</tpl>","{%this.renderDockedItems(out,values,1);%}"],frameTableTpl:["{%this.renderDockedItems(out,values,0);%}","<table><tbody>",'<tpl if="top">',"<tr>",'<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl></tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl></tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl></tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","<tr>",'<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl></tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl></tpl>" style="background-position: 0 0;" role="presentation">',"{%this.applyRenderTpl(out, values)%}","</td>",'<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl></tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>",'<tpl if="bottom">',"<tr>",'<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl></tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>','<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl></tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>','<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl if="uiCls"><tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl></tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',"</tr>","</tpl>","</tbody></table>","{%this.renderDockedItems(out,values,1);%}"],afterRender:function(){var a=this;a.finishRenderChildren();if(a.styleHtmlContent){a.getTargetEl().addCls(a.styleHtmlCls)}if(!a.ownerCt){a.updateLayout()}},afterFirstLayout:function(){var c=this,b=Ext.isDefined(c.x),a=Ext.isDefined(c.y),e,d;if(c.floating&&(!b||!a)){if(c.floatParent){d=c.el.getAlignToXY(c.floatParent.getTargetEl(),"c-c");e=c.floatParent.getTargetEl().translatePoints(d[0],d[1])}else{d=c.el.getAlignToXY(c.container,"c-c");e=c.container.translatePoints(d[0],d[1])}c.x=b?c.x:e.left;c.y=a?c.y:e.top;b=a=true}if(b||a){c.setPosition(c.x,c.y)}c.fireEvent("boxready",c)},applyRenderSelectors:function(){var d=this,b=d.renderSelectors,c=d.el,e=c.dom,a;d.applyChildEls(c);if(b){for(a in b){if(b.hasOwnProperty(a)&&b[a]){d[a]=Ext.get(Ext.DomQuery.selectNode(b[a],e))}}}},beforeRender:function(){var b=this,a=b.getComponentLayout();if(!a.initialized){a.initLayout()}b.setUI(b.ui);if(b.disabled){b.disable(true)}},doApplyRenderTpl:function(c,a){var d=a.$comp,b;if(!d.rendered){b=d.initRenderTpl();b.applyOut(a.renderData,c)}},doAutoRender:function(){var a=this;if(!a.rendered){if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}}},doRenderContent:function(a,c){var b=c.$comp;if(b.html){Ext.DomHelper.generateMarkup(b.html,a);delete b.html}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=new Ext.XTemplate(b.tpl)}if(b.data){b.tpl.applyOut(b.data,a);delete b.data}}},doRenderFramingDockedItems:function(a,c,d){var b=c.$comp;if(!b.rendered&&b.doRenderDockedItems){c.renderData.$skipDockedItems=true;b.doRenderDockedItems.call(this,a,c,d)}},finishRender:function(e){var j=this,h,d,a,b,c,g,i;if(!j.el||j.$pid){if(j.container){b=j.container.getById(j.id,true)}else{b=Ext.getDom(j.id)}if(!j.el){j.wrapPrimaryEl(b)}else{delete j.$pid;if(!j.el.dom){j.wrapPrimaryEl(j.el)}b.parentNode.insertBefore(j.el.dom,b);Ext.removeNode(b)}}else{if(!j.rendering){h=j.initRenderTpl();if(h){d=j.initRenderData();h.append(j.getTargetEl(),d)}}}if(!j.container){j.container=Ext.get(j.el.dom.parentNode)}if(j.ctCls){j.container.addCls(j.ctCls)}j.onRender(j.container,e);i=j.getTargetEl();i.setStyle(j.getOverflowStyle());j.el.setVisibilityMode(Ext.Element[j.hideMode.toUpperCase()]);if(j.overCls){j.el.hover(j.addOverCls,j.removeOverCls,j)}j.fireEvent("render",j);if(j.contentEl){c=Ext.baseCSSPrefix;g=c+"hide-";a=Ext.get(j.contentEl);a.removeCls([c+"hidden",g+"display",g+"offsets",g+"nosize"]);i.appendChild(a.dom)}j.afterRender();j.fireEvent("afterrender",j);j.initEvents();if(j.hidden){j.el.hide()}},finishRenderChildren:function(){var a=this.getComponentLayout();a.finishRender()},getElConfig:function(){var d=this,e=d.autoEl,c=d.getFrameInfo(),b,a={tag:"div",id:d.id,tpl:c?d.initFramingTpl(c.table):d.initRenderTpl()};d.initStyles(d.protoEl);d.protoEl.writeTo(a,"cls","style");d.protoEl=null;if(Ext.isString(e)){a.tag=e}else{Ext.apply(a,e)}if(a.tpl){if(c){d.frameGenId=1;b=d.id+"-frame1";a.tplData=Ext.apply({},{$comp:d,fgid:b,ui:d.ui,uiCls:d.uiCls,frameCls:d.frameCls,baseCls:d.baseCls,frameWidth:c.maxWidth,top:!!c.top,left:!!c.left,right:!!c.right,bottom:!!c.bottom,renderData:d.initRenderData()},d.getFramePositions(c));Ext.each(["TL","TC","TR","ML","MC","MR","BL","BC","BR"],function(g){d.addChildEls({name:"frame"+g,id:b+g})});d.addChildEls({name:"frameBody",id:b+"MC"})}else{a.tplData=d.initRenderData()}}return a},initFramingTpl:function(b){var a=b?this.getTpl("frameTableTpl"):this.getTpl("frameTpl");if(a&&!a.applyRenderTpl){this.setupFramingTpl(a)}return a},setupFramingTpl:function(a){a.applyRenderTpl=this.doApplyRenderTpl;a.renderDockedItems=this.doRenderFramingDockedItems},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},getRenderTree:function(){var a=this;a.beforeRender();if(a.fireEvent("beforerender",a)!==false){a.rendering=true;if(a.el){return{tag:"div",id:(a.$pid=Ext.id())}}return a.getElConfig()}return null},initContainer:function(a){var b=this;if(!a&&b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=a.dom?a:Ext.get(a);return b.container},initRenderData:function(){var a=this;return Ext.apply({$comp:a,id:a.id,ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame},a.renderData)},initRenderTpl:function(){var a=this.getTpl("renderTpl");if(a&&!a.renderContent){this.setupRenderTpl(a)}return a},onRender:function(d,e){var g=this,i=g.x,h=g.y,c,a,j,b=g.el;if(Ext.scopeResetCSS&&!g.ownerCt){if(b.dom==Ext.getBody().dom){b.parent().addCls(Ext.baseCSSPrefix+"reset")}else{g.resetEl=b.wrap({cls:Ext.baseCSSPrefix+"reset"})}}g.applyRenderSelectors();delete g.rendering;g.rendered=true;c=null;if(i!==undefined){c=c||{};c.x=i}if(h!==undefined){c=c||{};c.y=h}if(!g.getFrameInfo()){a=g.width;j=g.height;if(typeof a=="number"){c=c||{};c.width=a}if(typeof j=="number"){c=c||{};c.height=j}}g.lastBox=g.el.lastBox=c},render:function(c,b){var e=this,d=e.el&&(e.el=Ext.get(e.el)),a,g;Ext.suspendLayouts();c=e.initContainer(c);g=e.getInsertPosition(b);if(!d){a=e.getRenderTree();if(g){d=Ext.DomHelper.insertBefore(g,a)}else{d=Ext.DomHelper.append(c,a)}e.wrapPrimaryEl(d)}else{e.initStyles(d);if(e.allowDomMove!==false){if(g){c.dom.insertBefore(d.dom,g)}else{c.dom.appendChild(d.dom)}}}e.finishRender(b);Ext.resumeLayouts(!c.isDetachedBody)},ensureAttachedToBody:function(c){var b=this,a;while(b.ownerCt){b=b.ownerCt}if(b.container.isDetachedBody){b.container=a=Ext.getBody();a.appendChild(b.el.dom);if(c){b.updateLayout()}if(typeof b.x=="number"||typeof b.y=="number"){b.setPosition(b.x,b.y)}}},setupRenderTpl:function(a){a.renderBody=a.renderContent=this.doRenderContent},wrapPrimaryEl:function(a){this.el=Ext.get(a,true)},initFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,d=e.getFrameInfo(),b,a,c;if(d){b=d.maxWidth;a=e.getFrameTpl(d.table);e.frameGenId=c=(e.frameGenId||0)+1;c=e.id+"-frame"+c;a.insertFirst(e.el,Ext.apply({$comp:e,fgid:c,ui:e.ui,uiCls:e.uiCls,frameCls:e.frameCls,baseCls:e.baseCls,frameWidth:b,top:!!d.top,left:!!d.left,right:!!d.right,bottom:!!d.bottom},e.getFramePositions(d)));e.frameBody=e.el.down("."+e.frameCls+"-mc");e.removeChildEls(function(g){return g.id&&e.frameIdRegex.test(g.id)});Ext.each(["TL","TC","TR","ML","MC","MR","BL","BC","BR"],function(g){e["frame"+g]=e.el.getById(c+g)})}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,h=this.frameSize&&this.frameSize.table,g=this.frameTL,d=this.frameBL,c=this.frameML,a=this.frameMC,b;this.initFrame();if(a){if(e.frame){b=this.frameMC.dom.className;a.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=a;a.dom.className=b;if(h){e.el.query("> table")[1].remove()}else{if(g){g.remove()}if(d){d.remove()}c.remove()}}else{}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){var i=this;if(Ext.supports.CSS3BorderRadius){return false}var l=i.frameInfoCache,a=i.el?i.el:i.protoEl,m=a.dom?a.dom.className:a.classList.join(" "),h,c,k,d=i.ownerCt,b,g,j,e=i.getXType();if(i.dock){e+="-dock-"+i.dock;if(d.isWindow){e="window:"+e}}else{if(d&&d.dock){e=d.getXType()+"-dock-"+d.dock+":"+e}}if(typeof g=="undefined"){h=Ext.fly(i.getStyleProxy(m),"frame-style-el");c=h.getStyle("background-position-x");k=h.getStyle("background-position-y");if(!c&&!k){b=h.getStyle("background-position").split(" ");c=b[0];k=b[1]}if(parseInt(c,10)>=1000000&&parseInt(k,10)>=1000000){j=Math.max;g={table:c.substr(0,3)=="110",vertical:k.substr(0,3)=="110",top:j(c.substr(3,2),c.substr(5,2)),right:j(c.substr(5,2),k.substr(3,2)),bottom:j(k.substr(3,2),k.substr(5,2)),left:j(k.substr(5,2),c.substr(3,2))};g.maxWidth=j(g.top,g.right,g.bottom,g.left);g.width=g.left+g.right;g.height=g.top+g.bottom;a.setStyle("background-image","none")}l[e]=g||false}i.frame=!!g;i.frameSize=g||false;return g},getStyleProxy:function(b){var a=this.styleProxyEl||(Ext.AbstractComponent.prototype.styleProxyEl=Ext.getBody().createChild({style:{position:"absolute",top:"-10000px"}},null,true));a.className=b;return a},getFramePositions:function(e){var h=this,i=e.maxWidth,j=h.dock,d,b,g,c,a;if(e.vertical){b="0 -"+(i*0)+"px";g="0 -"+(i*1)+"px";if(j&&j=="right"){b="right -"+(i*0)+"px";g="right -"+(i*1)+"px"}d={tl:"0 -"+(i*0)+"px",tr:"0 -"+(i*1)+"px",bl:"0 -"+(i*2)+"px",br:"0 -"+(i*3)+"px",ml:"-"+(i*1)+"px 0",mr:"right 0",tc:b,bc:g}}else{c="-"+(i*0)+"px 0";a="right 0";if(j&&j=="bottom"){c="left bottom";a="right bottom"}d={tl:"0 -"+(i*2)+"px",tr:"right -"+(i*3)+"px",bl:"0 -"+(i*4)+"px",br:"right -"+(i*5)+"px",ml:c,mr:a,tc:"0 -"+(i*0)+"px",bc:"0 -"+(i*1)+"px"}}return d},getFrameTpl:function(a){return this.getTpl(a?"frameTableTpl":"frameTpl")},frameInfoCache:{},_frameInfoCache:{panel:{table:false,vertical:false,top:4,right:4,bottom:4,left:4,maxWidth:4,width:8,height:8},window:{table:false,vertical:false,top:5,right:5,bottom:5,left:5,maxWidth:5,width:10,height:10},form:{table:false,vertical:false,top:4,right:4,bottom:4,left:4,maxWidth:4,width:8,height:8},grid:{table:false,vertical:false,top:4,right:4,bottom:4,left:4,maxWidth:4,width:8,height:8},button:{table:true,vertical:false,top:3,right:3,bottom:3,left:3,maxWidth:3,width:6,height:6},buttongroup:{table:false,vertical:false,top:2,right:2,bottom:2,left:2,maxWidth:2,width:4,height:4},splitbutton:{table:true,vertical:false,top:3,right:3,bottom:3,left:3,maxWidth:3,width:6,height:6},tip:{table:true,vertical:false,top:5,right:5,bottom:5,left:5,maxWidth:5,width:10,height:10},"header-dock-top":{table:false,vertical:false,top:4,right:4,bottom:0,left:4,maxWidth:4,width:8,height:4},"header-dock-left":{table:false,vertical:true,top:4,right:0,bottom:4,left:4,maxWidth:4,width:4,height:8},"header-dock-right":{table:false,vertical:true,top:4,right:4,bottom:4,left:0,maxWidth:4,width:4,height:8},"window:header-dock-top":{table:false,vertical:false,top:5,right:5,bottom:0,left:5,maxWidth:5,width:10,height:5},"window:header-dock-right":{table:false,vertical:false,top:5,right:5,bottom:5,left:0,maxWidth:5,width:5,height:10},"window:header-dock-bottom":{table:false,vertical:false,top:0,right:5,bottom:5,left:5,maxWidth:5,width:10,height:5},"window:header-dock-left":{table:false,vertical:false,top:5,right:0,bottom:5,left:5,maxWidth:5,width:5,height:10},"tabbar-dock-top:tab":{table:true,vertical:false,top:4,right:4,bottom:0,left:4,maxWidth:4,width:8,height:4},"tabbar-dock-bottom:tab":{table:true,vertical:false,top:0,right:4,bottom:4,left:4,maxWidth:4,width:8,height:4}}});Ext.define("Ext.util.Sorter",{direction:"ASC",constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.property,e=c.direction||"ASC",a=e.toUpperCase()=="DESC"?-1:1;return function(h,g){return a*b.call(c,h,g)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,g=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){g=a(g);e=a(e)}return g>e?1:(g<e?-1:0)},getRoot:function(a){return this.root===undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,"ASC","DESC");a.updateSortFunction()},updateSortFunction:function(a){var b=this;a=a||b.sorterFn||b.defaultSorterFn;b.sort=b.createSortFunction(a)}});Ext.define("Ext.Action",{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconCls:function(a){this.initialConfig.iconCls=a;this.callEach("setIconCls",[a])},getIconCls:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,c){var b=this.items,d=0,a=b.length;for(;d<a;d++){b[d][e].apply(b[d],c)}},addComponent:function(a){this.items.push(a);a.on("destroy",this.removeComponent,this)},removeComponent:function(a){Ext.Array.remove(this.items,a)},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||Ext.global,arguments)}});Ext.define("Ext.Layer",{extend:"Ext.Element",uses:["Ext.Shadow"],statics:{shims:[]},constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,g=b.parentEl,e=g?Ext.getDom(g):document.body,h=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:"div",cls:Ext.baseCSSPrefix+"layer"})}else{c.addCls(Ext.baseCSSPrefix+"layer");if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}Ext.Element.addToCache(c);if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(h){c.setVisibilityMode(Ext.Element[h.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=new Ext.Shadow({offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&&Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle("z-index"),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode("block");c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&&!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&&b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var j=this,n=j.shadow,i,e,a;if(!j.updating&&j.isVisible()&&(n||j.useShim)){var d=j.getShim(),c=j.getLeft(true),o=j.getTop(true),m=j.dom.offsetWidth,g=j.dom.offsetHeight,k;if(n&&!j.shadowDisabled){if(b&&!n.isVisible()){n.show(j)}else{n.realign(c,o,m,g)}if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();if(n.isVisible()){i=n.el.getXY();e=d.dom.style;a=n.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;i[0]-=2;i[1]-=4}e.left=(i[0])+"px";e.top=(i[1])+"px";e.width=(a.width)+"px";e.height=(a.height)+"px"}else{d.setSize(m,g);d.setLeftTop(c,o)}}}else{if(d){k=d.getStyle("z-index");if(k>j.zindex){j.shim.setStyle("z-index",j.zindex-2)}d.show();d.setSize(m,g);d.setLeftTop(c,o)}}}return j},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var g=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),l=Ext.getDoc().getScroll(),k=this.getXY(),i=k[0],e=k[1],a=this.shadowOffset,j=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((i+j)>g+l.left){i=g-j-a;d=true}if((e+c)>b+l.top){e=b-c-a;d=true}if(i<l.left){i=l.left;d=true}if(e<l.top){e=l.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[i,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,h,g){var c=this,a;a=function(){if(e){c.sync(true)}if(h){h()}};if(!e){c.hideUnders(true)}c.callParent([e,b,d,h,g]);if(!b){a()}return c},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setXY:function(d,a,c,g,e){var b=this;g=b.createCB(g);b.fixDisplay();b.beforeAction();b.callParent([d,a,c,g,e]);if(!a){g()}return b},createCB:function(c){var a=this,b=a.shadow&&a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,e,i,g){var d=this;i=d.createCB(i);d.beforeAction();d.callParent([a,c,b,e,i,g]);if(!b){i()}return d},setWidth:function(a,b,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([a,b,d,g,e]);if(!b){g()}return c},setHeight:function(b,a,d,g,e){var c=this;g=c.createCB(g);c.beforeAction();c.callParent([b,a,d,g,e]);if(!a){g()}return c},setBounds:function(h,g,a,j,b,c,i,d){var e=this;i=e.createCB(i);e.beforeAction();if(!b){Ext.Layer.superclass.setXY.call(e,[h,g]);Ext.Layer.superclass.setSize.call(e,a,j);i()}else{e.callParent([h,g,a,j,b,c,i,d])}return e},setZIndex:function(a){var b=this;b.zindex=a;if(b.getShim()){b.shim.setStyle("z-index",a++)}if(b.shadow){b.shadow.setZIndex(a++)}return b.setStyle("z-index",a)},setOpacity:function(a){if(this.shadow){this.shadow.setOpacity(a)}return this.callParent(arguments)}});Ext.define("Ext.ShadowPool",{singleton:true,requires:["Ext.DomHelper"],markup:function(){if(Ext.supports.CSS3BoxShadow){return'<div class="'+Ext.baseCSSPrefix+'css-shadow" role="presentation"></div>'}else{if(Ext.isIE){return'<div class="'+Ext.baseCSSPrefix+'ie-shadow" role="presentation"></div>'}else{return'<div class="'+Ext.baseCSSPrefix+'frame-shadow" role="presentation"><div class="xst" role="presentation"><div class="xstl" role="presentation"></div><div class="xstc" role="presentation"></div><div class="xstr" role="presentation"></div></div><div class="xsc" role="presentation"><div class="xsml" role="presentation"></div><div class="xsmc" role="presentation"></div><div class="xsmr" role="presentation"></div></div><div class="xsb" role="presentation"><div class="xsbl" role="presentation"></div><div class="xsbc" role="presentation"></div><div class="xsbr" role="presentation"></div></div></div>'}}}(),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){Ext.Array.each(this.shadows,function(a){a.remove()});this.shadows=[]}});Ext.define("Ext.ZIndexManager",{alternateClassName:"Ext.WindowGroup",statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on("resize",b._onContainerResize,b);b.zseed=Ext.Number.from(b.rendered?a.getEl().getStyle("zIndex"):undefined,b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(b){this.zseed=b;var a=this.assignZIndices();this._activateLast();return a},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,g=this.zseed,d;for(;e<b;e++){d=c[e];if(d&&!d.hidden){g=d.setZIndex(g)}}this._activateLast();return g},_setActiveChild:function(a){var b=this.front;if(a!==b){if(b&&!b.destroying){b.setActive(false,a)}this.front=a;if(a){a.setActive(true);if(a.modal){this._showModalMask(a)}}}},onComponentHide:function(a){a.setActive(false);this._activateLast()},_activateLast:function(){var d=this,a=d.zIndexStack,c=a.length-1,b;d.front=undefined;for(;c>=0&&a[c].hidden;--c){}if((b=a[c])){d._setActiveChild(b);if(b.modal){return}}for(;c>=0;--c){b=a[c];if(b.visible&&b.modal){d._showModalMask(b);return}}d._hideModalMask()},_showModalMask:function(a){var c=this,e=a.el.getStyle("zIndex")-4,b=a.floatParent?a.floatParent.getTargetEl():a.container,d=b.getBox();if(b.dom===document.body){d.height=Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight());d.width=Math.max(document.body.scrollWidth,d.width)}if(!c.mask){c.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask"});c.mask.setVisibilityMode(Ext.Element.DISPLAY);c.mask.on("click",c._onMaskClick,c)}c.mask.maskTarget=b;b.addCls(Ext.baseCSSPrefix+"body-masked");c.mask.setBox(d);c.mask.setStyle("zIndex",e);c.mask.show()},_hideModalMask:function(){var a=this.mask;if(a&&a.isVisible()){a.maskTarget.removeCls(Ext.baseCSSPrefix+"body-masked");a.maskTarget=undefined;a.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){var a=this.mask,b,c;if(a&&a.isVisible()){a.hide();b=a.maskTarget;if(b.dom===document.body){c={height:Math.max(document.body.scrollHeight,Ext.dom.Element.getDocumentHeight()),width:Math.max(document.body.scrollWidth,document.documentElement.clientWidth)}}else{c=b.getViewSize(true)}a.setSize(c);a.show()}},register:function(a){var b=this;if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=b;b.list[a.id]=a;b.zIndexStack.push(a);a.on("hide",b.onComponentHide,b)},unregister:function(a){var b=this,c=b.list;delete a.zIndexManager;if(c&&c[a.id]){delete c[a.id];a.un("hide",b.onComponentHide);Ext.Array.remove(b.zIndexStack,a);b._activateLast()}},get:function(a){return typeof a=="object"?a:this.list[a]},bringToFront:function(b){var c=this,a=false;b=c.get(b);if(b!==c.front){Ext.Array.remove(c.zIndexStack,b);c.zIndexStack.push(b);c.assignZIndices();a=true;this.front=b}if(a&&b.modal){c._showModalMask(b)}return a},sendToBack:function(a){var b=this;a=b.get(a);Ext.Array.remove(b.zIndexStack,a);b.zIndexStack.unshift(a);b.assignZIndices();this._activateLast();return a},hideAll:function(){var b=this.list,a,c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(a.isComponent&&a.isVisible()){a.hide()}}}},hide:function(){var d=0,b=this.zIndexStack,a=b.length,c;this.tempHidden=[];for(;d<a;d++){c=b[d];if(c.isVisible()){this.tempHidden.push(c);c.hide()}}},show:function(){var c=0,d=this.tempHidden,a=d?d.length:0,b;for(;c<a;c++){b=d[c];b.show();b.setPosition(b.x,b.y)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(g,e){var h=[],d=0,b=this.zIndexStack,a=b.length,c;for(;d<a;d++){c=b[d];if(g.call(e||c,c)!==false){h.push(c)}}return h},each:function(c,b){var d=this.list,e,a;for(e in d){if(d.hasOwnProperty(e)){a=d[e];if(a.isComponent&&c.call(b||a,a)===false){return}}}},eachBottomUp:function(g,e){var b=this.zIndexStack,d=0,a=b.length,c;for(;d<a;d++){c=b[d];if(c.isComponent&&g.call(e||c,c)===false){return}}},eachTopDown:function(e,d){var a=this.zIndexStack,c=a.length,b;for(;c-->0;){b=a[c];if(b.isComponent&&e.call(d||b,b)===false){return}}},destroy:function(){var a=this;a.each(function(b){b.destroy()});delete a.zIndexStack;delete a.list;delete a.container;delete a.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define("Ext.dd.DragDropManager",{singleton:true,requires:["Ext.util.Region"],uses:["Ext.tip.QuickTipManager"],alternateClassName:["Ext.dd.DragDropMgr","Ext.dd.DDM"],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,notifyOccluded:false,_execOnAll:function(c,b){for(var d in this.ids){for(var a in this.ids[d]){var e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(a){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&&b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&&this.ids[a]&&this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(g,b){var e=[];for(var d in g.groups){for(var c in this.ids[d]){var a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true);for(var c=0,a=b.length;c<a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&&a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&&this.handleIds[b][a])},getDDById:function(b){for(var a in this.ids){if(this.ids[a][b]){return this.ids[a][b]}}return null},handleMouseDown:function(c,b){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(c)}this.currentTarget=c.getTarget();this.dragCurrent=b;var a=b.getEl();this.startX=c.getPageX();this.startY=c.getPageY();this.deltaX=this.startX-a.offsetLeft;this.deltaY=this.startY-a.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var d=Ext.dd.DragDropManager;d.startDrag(d.startX,d.startY)},this.clickTimeThresh)},startDrag:function(a,b){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(a,b);this.dragCurrent.startDrag(a,b)}this.dragThreshMet=true},handleMouseUp:function(a){if(Ext.tip&&Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(a,true)}else{}this.stopDrag(a);this.stopEvent(a)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(a){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(a);this.dragCurrent.endDrag(a)}this.dragCurrent.onMouseUp(a)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(c){if(!this.dragCurrent){return true}if(Ext.isIE&&(c.button!==0&&c.button!==1&&c.button!==2)){this.stopEvent(c);return this.handleMouseUp(c)}if(!this.dragThreshMet){var b=Math.abs(this.startX-c.getPageX());var a=Math.abs(this.startY-c.getPageY());if(b>this.clickPixelThresh||a>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(c);this.dragCurrent.onDrag(c);if(!this.dragCurrent.moveOnly){this.fireEvents(c,false)}}this.stopEvent(c);return true},fireEvents:function(n,q){var p=this,k=p.dragCurrent,r=n.getPoint(),b,t,d=[],a=[],g=[],l=[],j=[],c=[],o,h,m,s;if(!k||k.isLocked()){return}for(h in p.dragOvers){b=p.dragOvers[h];if(!p.isTypeOfDD(b)){continue}if(!this.isOverTarget(r,b,p.mode)){g.push(b)}a[h]=true;delete p.dragOvers[h]}for(s in k.groups){if("string"!=typeof s){continue}for(h in p.ids[s]){b=p.ids[s][h];if(p.isTypeOfDD(b)&&(t=b.getEl())&&(b.isTarget)&&(!b.isLocked())&&((b!=k)||(k.ignoreSelf===false))){if((b.zIndex=p.getZIndex(t))!==-1){o=true}d.push(b)}}}if(o){Ext.Array.sort(d,p.byZIndex)}for(h=0,m=d.length;h<m;h++){b=d[h];if(p.isOverTarget(r,b,p.mode)){if(q){j.push(b)}else{if(!a[b.id]){c.push(b)}else{l.push(b)}p.dragOvers[b.id]=b}if(!p.notifyOccluded){break}}}if(p.mode){if(g.length){k.b4DragOut(n,g);k.onDragOut(n,g)}if(c.length){k.onDragEnter(n,c)}if(l.length){k.b4DragOver(n,l);k.onDragOver(n,l)}if(j.length){k.b4DragDrop(n,j);k.onDragDrop(n,j)}}else{for(h=0,m=g.length;h<m;++h){k.b4DragOut(n,g[h].id);k.onDragOut(n,g[h].id)}for(h=0,m=c.length;h<m;++h){k.onDragEnter(n,c[h].id)}for(h=0,m=l.length;h<m;++h){k.b4DragOver(n,l[h].id);k.onDragOver(n,l[h].id)}for(h=0,m=j.length;h<m;++h){k.b4DragDrop(n,j[h].id);k.onDragDrop(n,j[h].id)}}if(q&&!j.length){k.onInvalidDrop(n)}},getZIndex:function(b){var a=document.body,c,d=-1;b=Ext.getDom(b);while(b!==a){if(!isNaN(c=Number(Ext.fly(b).getStyle("zIndex")))){d=c}b=b.parentNode}return d},byZIndex:function(b,a){return b.zIndex<a.zIndex},getBestMatch:function(c){var e=null;var b=c.length;if(b==1){e=c[0]}else{for(var d=0;d<b;++d){var a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()<a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){for(var a in b){if("string"!=typeof a){continue}for(var c in this.ids[a]){var d=this.ids[a][c];if(this.isTypeOfDD(d)){var e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(i){if(!this.isTypeOfDD(i)){return null}if(i.getRegion){return i.getRegion()}var g=i.getEl(),m,d,c,o,n,p,a,k,h;try{m=Ext.Element.getXY(g)}catch(j){}if(!m){return null}d=m[0];c=d+g.offsetWidth;o=m[1];n=o+g.offsetHeight;p=o-i.padding[0];a=c+i.padding[1];k=n+i.padding[2];h=d-i.padding[3];return new Ext.util.Region(p,a,k,h)},isOverTarget:function(j,a,c){var e=this.locationCache[a.id];if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(j);var i=this.dragCurrent;if(!i||!i.getTargetCoord||(!c&&!i.constrainX&&!i.constrainY)){return a.cursorIsOver}a.overlap=null;var g=i.getTargetCoord(j.x,j.y);var b=i.getDragEl();var d=new Ext.util.Region(g.y,g.x+b.offsetWidth,g.y+b.offsetHeight,g.x);var h=d.intersect(e);if(h){a.overlap=h;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll("unreg",[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&&a.id;this.css=this.el&&a.style},getPosX:function(a){return Ext.Element.getX(a)},getPosY:function(a){return Ext.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode;var b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&&(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.Element.getXY(c);Ext.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount>2000){}else{setTimeout(this._addListeners,10);if(document&&document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define("Ext.dd.DragTracker",{uses:["Ext.util.Region"],mixins:{observable:"Ext.util.Observable"},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mouseover","mouseout","mousedown","mouseup","mousemove","beforedragstart","dragstart","dragend","drag");this.dragRegion=new Ext.util.Region(0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(a){this.el=Ext.get(a);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent("mouseover",a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(a){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent("mouseout",this,a)}},onMouseDown:function(b,a){if(this.disabled||b.dragTracked){return}this.dragTarget=this.delegate?a:this.handle.dom;this.startXY=this.lastXY=b.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent("mousedown",this,b)===false||this.fireEvent("beforedragstart",this,b)===false||this.onBeforeStart(b)===false){return}this.mouseIsDown=true;b.dragTracked=true;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[b])}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.max(Math.abs(a[0]-b[0]),Math.abs(a[1]-b[1]))>this.tolerance){this.triggerStart(d)}else{return}}if(this.fireEvent("mousemove",this,d)===false){this.onMouseUp(d)}else{this.onDrag(d);this.fireEvent("drag",this,d)}},onMouseUp:function(a){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(a)}a.preventDefault();this.fireEvent("mouseup",this,a);this.endDrag(a)},endDrag:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);this.clearStart();this.active=false;if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,g){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return g}e.translateBy(g[0]-b[0],g[1]-b[1]);if(e.right>a.right){g[0]+=d=(a.right-e.right);e.left+=d}if(e.left<a.left){g[0]+=(a.left-e.left)}if(e.bottom>a.bottom){g[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top<a.top){g[1]+=(a.top-e.top)}return g}}});Ext.define("Ext.dd.Registry",{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b=="string"){return b}var c=b.id;if(!c&&a!==false){c="extdd-"+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d=="string"){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var g=this.getId(d,false);var e=this.elements[g];if(e){delete this.elements[g];if(e.handles){var c=e.handles;for(var b=0,a=c.length;b<a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!="string"){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!="string"){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define("Ext.dd.ScrollManager",{singleton:true,requires:["Ext.dd.DragDropManager"],constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=""},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&&b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(h,k){if(k||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var l=h.getXY(),m=h.getPoint(),i=this.proc,g=this.els;for(var b in g){var d=g[b],a=d._region;var j=d.ddScrollConfig?d.ddScrollConfig:this;if(a&&a.contains(m)&&d.isScrollable()){if(a.bottom-m.y<=j.vthresh){if(i.el!=d){this.startProc(d,"down")}return}else{if(a.right-m.x<=j.hthresh){if(i.el!=d){this.startProc(d,"left")}return}else{if(m.y-a.top<=j.vthresh){if(i.el!=d){this.startProc(d,"up")}return}else{if(m.x-a.left<=j.hthresh){if(i.el!=d){this.startProc(d,"right")}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b<a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]=="object"){a[b]._region=a[b].getRegion()}}}});Ext.define("Ext.form.FieldAncestor",{initFieldAncestor:function(){var a=this,b=a.onFieldAncestorSubtreeChange;a.addEvents("fieldvaliditychange","fielderrorchange");a.on("add",b,a);a.on("remove",b,a);a.initFieldDefaults()},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},onFieldAncestorSubtreeChange:function(b,e){var c=this,d=!!e.ownerCt;function a(g){var h=g.isFieldLabelable,i=g.isFormField;if(h||i){if(h){c["onLabelable"+(d?"Added":"Removed")](g)}if(i){c["onField"+(d?"Added":"Removed")](g)}}else{if(g.isContainer){Ext.Array.forEach(g.getRefItems(),a)}}}a(e)},onLabelableAdded:function(a){var b=this;b.mon(a,"errorchange",b.handleFieldErrorChange,b,{buffer:10});a.setFieldDefaults(b.fieldDefaults)},onFieldAdded:function(b){var a=this;a.mon(b,"validitychange",a.handleFieldValidityChange,a)},onLabelableRemoved:function(a){var b=this;b.mun(a,"errorchange",b.handleFieldErrorChange,b)},onFieldRemoved:function(b){var a=this;a.mun(b,"validitychange",a.handleFieldValidityChange,a)},handleFieldValidityChange:function(c,b){var a=this;a.fireEvent("fieldvaliditychange",a,c,b);a.onFieldValidityChange(c,b)},handleFieldErrorChange:function(b,a){var c=this;c.fireEvent("fielderrorchange",c,b,a);c.onFieldErrorChange(b,a)},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn});Ext.define("Ext.form.action.Action",{alternateClassName:"Ext.form.Action",submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||"POST").toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:"client",SERVER_INVALID:"server",CONNECT_FAILURE:"connect",LOAD_FAILURE:"load"}});Ext.define("Ext.form.action.Submit",{extend:"Ext.form.action.Action",alternateClassName:"Ext.form.Action.Submit",alias:"formaction.submit",type:"submit",run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var c=[],d,e,b=this.form,h=this.getParams(),a=[];b.getFields().each(function(i){if(i.isFileUpload()){a.push(i)}});function g(i,j){c.push({tag:"input",type:"hidden",name:i,value:Ext.String.htmlEncode(j)})}Ext.iterate(h,function(i,j){if(Ext.isArray(j)){Ext.each(j,function(k){g(i,k)})}else{g(i,j)}});d={tag:"form",action:this.getUrl(),method:this.getMethod(),target:this.target||"_self",style:"display:none",cn:c};if(a.length){d.encoding=d.enctype="multipart/form-data"}e=Ext.DomHelper.append(Ext.getBody(),d);Ext.Array.each(a,function(i){if(i.rendered){e.appendChild(i.extractFileInput())}});return e},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&&!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var h=this.form,e=h.errorReader,c,j,g,a,b;if(e){c=e.read(d);b=c.records;j=[];if(b){for(g=0,a=b.length;g<a;g++){j[g]=b[g].data}}if(j.length<1){j=null}return{success:c.success,errors:j}}return Ext.decode(d.responseText)}});Ext.define("Ext.form.field.Field",{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents("change","validitychange","dirtychange");this.initValue()},initValue:function(){var a=this;a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,""))===String(Ext.value(a,""))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){b={};b[a.getName()]=""+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&&!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&&!c.isDestroyed){c.lastValue=b;c.fireEvent("change",c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&&typeof a.originalValue!="undefined"&&!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent("dirtychange",a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent("validitychange",a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.form.field.VTypes",(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:"Ext.form.VTypes",email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format "user@example.com"',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format "http://www.example.com"',alpha:function(e){return c.test(e)},alphaText:"This field should only contain letters and _",alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:"This field should only contain letters, numbers and _",alphanumMask:/[a-z0-9_]/i}})());Ext.define("Ext.grid.LockingView",{mixins:{observable:"Ext.util.Observable"},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var g=this,i=[],a=g.eventRelayRe,b=c.locked.getView(),h=c.normal.getView(),d,e;Ext.apply(g,{lockedView:b,normalView:h,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});g.mixins.observable.constructor.call(g,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&&a.test(e)){i.push(e)}}g.relayEvents(b,i);g.relayEvents(h,i);h.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter});b.on({scope:g,itemmouseleave:g.onItemMouseLeave,itemmouseenter:g.onItemMouseEnter})},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(a){return this.getViewForColumn(a).getEl()},getViewForColumn:function(b){var a=this.lockedView,c;a.headerCt.cascade(function(d){if(d===b){c=true;return false}});return c?a:this.normalView},onItemMouseEnter:function(c,b){var g=this,d=g.lockedView,a=g.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b||[]);a=this.normalView;a[c].apply(a,b||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(a){return this.normalView.getNode(a)},getCell:function(b,c){var a=this.getViewForColumn(c),d;d=a.getNode(b);return Ext.fly(d).down(c.getCellSelector())},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!b){a=this.normalView.getRecord(b)}return a},addElListener:function(a,c,b){this.relayFn("addElListener",arguments)},refreshNode:function(){this.relayFn("refreshNode",arguments)},refresh:function(){this.relayFn("refresh",arguments)},bindStore:function(){this.relayFn("bindStore",arguments)},addRowCls:function(){this.relayFn("addRowCls",arguments)},removeRowCls:function(){this.relayFn("removeRowCls",arguments)}});Ext.define("Ext.grid.PagingScroller",{percentageFromEdge:0.35,numFromEdge:2,trailingBufferZone:5,leadingBufferZone:15,scrollToLoadBuffer:200,constructor:function(a){var c=this,b={scroll:{fn:c.onViewScroll,element:"el",scope:c},render:c.onViewRender,resize:c.onViewResize,refresh:c.onViewRefresh,scope:c};Ext.apply(c,a);if(c.store){if(c.store.loaded){if(c.store.getTotalCount()){c.store.prefetchPage(2)}}}else{c.store.on({load:function(){c.store.prefetchPage(2)},single:true})}c.position=0;if(c.variableRowHeight){b.beforerefresh=c.beforeViewRefresh}c.view.on(b);c.store.on({guaranteedrange:c.onGuaranteedRange,scope:c});c.callParent(arguments)},onViewRender:function(){var b=this,a=b.view.el;a.setStyle("position","relative");b.stretcher=a.createChild({style:{position:"absolute",width:"1px",height:0,top:0,left:0}},a.dom.firstChild)},onViewResize:function(b,d,a){var g=this,c=g.store,e;g.minStoreSize=(a/21)+(g.numFromEdge*2)+g.trailingBufferZone+g.leadingBufferZone;e=Math.max(g.store.pageSize||0,Math.floor(g.minStoreSize+(c.numFromEdge*2)+c.trailingBufferZone+c.leadingBufferZone));if(c.pageSize){}else{c.pageSize=e}},beforeViewRefresh:function(){var c=this,a=c.view,d,b=c.store,e=c.lastScrollDirection;c.commonRecordIndex=undefined;if(c.variableRowHeight&&(c.previousStart!==undefined)&&(c.scrollProportion===undefined)){d=a.getNodes();if(e===1){if(b.guaranteedStart<=c.previousEnd){c.commonRecordIndex=d.length-1}}else{if(e===-1){if(b.guaranteedEnd>=c.previousStart){c.commonRecordIndex=0}}}c.scrollOffset=-a.el.getOffsetsTo(d[c.commonRecordIndex])[1];c.commonRecordIndex-=(b.guaranteedStart-c.previousStart)}else{c.scrollOffset=undefined}},onViewRefresh:function(){var c=this,b=c.getScrollHeight(),d=c.view,i=d.el.dom,e=c.store,k,h,a,j,g;c.stretcher.setHeight(b);if(c.scrollProportion!==undefined){j=c.view.el.child("table",true);c.scrollProportion=d.el.dom.scrollTop/(b-j.offsetHeight);j=c.view.el.child("table",true);j.style.position="absolute";j.style.top=(c.scrollProportion?(b*c.scrollProportion)-(j.offsetHeight*c.scrollProportion):0)+"px"}else{j=c.view.el.child("table",true);j.style.position="absolute";j.style.top=(g=(e.guaranteedStart||0)*c.rowHeight)+"px";if(c.scrollOffset){k=d.getNodes();h=-d.el.getOffsetsTo(k[c.commonRecordIndex])[1];a=h-c.scrollOffset;c.position=(d.el.dom.scrollTop+=a)}else{if((g>i.scrollTop)||((g+j.offsetHeight)<i.scrollTop+i.clientHeight)){c.position=i.scrollTop=g}}}},onGuaranteedRange:function(b,e,a){var c=this,d=c.store;if(b.length&&c.visibleStart<b[0].index){return}d.loadRecords(b)},onViewScroll:function(g,c){var d=this,a=d.view,b=d.position;d.position=a.el.dom.scrollTop;d.lastScrollDirection=d.position>b?1:-1;d.handleViewScroll(g,d.lastScrollDirection)},handleViewScroll:function(h,k){var i=this,m=i.store,j=i.view,a=i.previousStart=m.guaranteedStart,d=i.previousEnd=m.guaranteedEnd,c=m.getCount(),n=m.getTotalCount(),g=i.getFirstVisibleRowIndex(),l=i.getLastVisibleRowIndex(),b,o;if(n>=c){i.scrollProportion=undefined;if(k==-1){if(g!==undefined){if(g<(a+i.numFromEdge)){b=Math.max(0,l+i.numFromEdge+i.trailingBufferZone-c)}}else{i.scrollProportion=j.el.dom.scrollTop/(j.el.dom.scrollHeight-j.el.dom.clientHeight);b=Math.max(0,n*i.scrollProportion-(c/2)-i.numFromEdge-((i.leadingBufferZone+i.trailingBufferZone)/2))}}else{if(g!==undefined){if(l>(d-i.numFromEdge)){b=Math.min(g-i.numFromEdge-i.trailingBufferZone,n-c)}}else{i.scrollProportion=j.el.dom.scrollTop/(j.el.dom.scrollHeight-j.el.dom.clientHeight);b=Math.min(n-c,n*i.scrollProportion-(c/2)-i.numFromEdge-((i.leadingBufferZone+i.trailingBufferZone)/2))}}if(b!==undefined){b=b&~1;o=b+c-1;if(o>n-1){i.cancelLoad();if(!m.rangeSatisfied(n-c+1,n-1)){m.guaranteeRange(n-c+1,n-1)}}else{if(m.rangeSatisfied(b,o)){i.cancelLoad();m.guaranteeRange(b,o)}else{i.attemptLoad(b,o)}}}}},getFirstVisibleRowIndex:function(){var e=this,b=e.store,a=e.view,j=a.el.dom.scrollTop,g,d,c,h;if(e.variableRowHeight){g=a.getNodes();d=b.getCount();for(c=0;c<d;c++){h=Ext.fly(g[c]).getOffsetsTo(a.el)[1]+g[c].offsetHeight;if(h>a.el.dom.clientHeight){return}if(h>0){return c+b.guaranteedStart}}}else{return Math.floor(j/e.rowHeight)}},getLastVisibleRowIndex:function(){var h=this,c=h.store,a=h.view,b=a.el.dom.clientHeight,j,g,e,d;if(h.variableRowHeight){j=a.getNodes();g=c.getCount();for(e=g-1;e>=0;e--){d=Ext.fly(j[e]).getOffsetsTo(a.el)[1];if(d<0){return}if(d<b){return e+c.guaranteedStart}}}else{return h.getFirstVisibleRowIndex()+Math.ceil(b/h.rowHeight)}},getScrollHeight:function(){var e=this,a=e.view,d,h,c=e.store,b,g=0;if(e.variableRowHeight){d=e.view.el.down("table",true);if(e.rowHeight){g=d.offsetHeight-e.initialTableHeight}else{e.initialTableHeight=d.offsetHeight;e.rowHeight=e.initialTableHeight/e.store.pageSize}}else{if(!e.rowHeight){h=a.el.down(a.getItemSelector());e.rowHeight=h?h.getHeight(false,true):0}}b=c[(!c.remoteFilter&&c.isFiltered())?"getCount":"getTotalCount"]()||0;return Math.floor(b*e.rowHeight)+g},attemptLoad:function(c,a){var b=this;if(!b.loadTask){b.loadTask=new Ext.util.DelayedTask(b.doAttemptLoad,b,[])}b.loadTask.delay(b.scrollToLoadBuffer,b.doAttemptLoad,b,[c,a])},cancelLoad:function(){if(this.loadTask){this.loadTask.cancel()}},doAttemptLoad:function(b,a){this.store.mask();this.store.guaranteeRange(b,a)}});Ext.define("Ext.grid.feature.Feature",{extend:"Ext.util.Observable",alias:"feature.feature",isFeature:true,disabled:false,hasFeatureEvent:true,eventPrefix:null,eventSelector:null,view:null,grid:null,collectData:false,init:Ext.emptyFn,getFeatureTpl:function(){return""},getFireEventArgs:function(b,a,c,d){return[b,a,c,d]},attachEvents:function(){},getFragmentTpl:function(){return},mutateMetaRowTpl:function(a){},getMetaRowTplFragments:function(){return{}},getTableFragments:function(){return{}},getAdditionalData:function(c,a,b,d){return{}},enable:function(){this.disabled=false},disable:function(){this.disabled=true}});Ext.define("Ext.grid.feature.Grouping",{extend:"Ext.grid.feature.Feature",alias:"feature.grouping",eventPrefix:"group",eventSelector:"."+Ext.baseCSSPrefix+"grid-group-hd",constructor:function(){var a=this;a.collapsedState={};a.callParent(arguments)},groupHeaderTpl:"{columnName}: {name}",depthToIndent:17,collapsedCls:Ext.baseCSSPrefix+"grid-group-collapsed",hdCollapsedCls:Ext.baseCSSPrefix+"grid-group-hd-collapsed",groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedHeader:false,startCollapsed:false,enableGroupingMenu:true,enableNoGroups:true,enable:function(){var c=this,a=c.view,b=a.store,d;c.lastGroupField=c.getGroupField();if(c.lastGroupIndex){b.group(c.lastGroupIndex)}c.callParent();d=c.view.headerCt.getMenu().down("#groupToggleMenuItem");d.setChecked(true,true);c.refreshIf()},disable:function(){var d=this,a=d.view,b=a.store,g=b.remoteGroup,e,c;c=b.groupers.first();if(c){d.lastGroupIndex=c.property;d.block();b.clearGrouping();d.unblock()}d.callParent();e=d.view.headerCt.getMenu().down("#groupToggleMenuItem");e.setChecked(true,true);e.setChecked(false,true);if(!g){a.refresh()}},refreshIf:function(){if(this.blockRefresh!==true){this.view.refresh()}},getFeatureTpl:function(b,d,a,g){var e=this,c=e.groupHeaderTpl;if(Ext.isString(c)){c=new Ext.XTemplate(c)}else{if(Ext.isArray(c)){c=Ext.Array.clone(c);Ext.Array.splice(c,0,0,"Ext.XTemplate");c=Ext.create.apply(Ext,c)}}e.groupHeaderTpl=c;return["<tpl if=\"typeof rows !== 'undefined'\">",'<tr class="'+Ext.baseCSSPrefix+"grid-group-hd "+(e.startCollapsed?e.hdCollapsedCls:"")+' {hdCollapsedCls}"><td class="'+Ext.baseCSSPrefix+'grid-cell" colspan="'+d.columns.length+'" {[this.indentByDepth(values)]}><div class="'+Ext.baseCSSPrefix+'grid-cell-inner"><div class="'+Ext.baseCSSPrefix+'grid-group-title">{collapsed}{[this.renderGroupHeaderTpl(values)]}</div></div></td></tr>','<tr id="{viewId}-gp-{name}" class="'+Ext.baseCSSPrefix+"grid-group-body "+(e.startCollapsed?e.collapsedCls:"")+' {collapsedCls}"><td colspan="'+d.columns.length+'">{[this.recurse(values)]}</td></tr>',"</tpl>"].join("")},getFragmentTpl:function(){var a=this;return{indentByDepth:a.indentByDepth,depthToIndent:a.depthToIndent,renderGroupHeaderTpl:function(b){return a.groupHeaderTpl.apply(b)}}},indentByDepth:function(a){var b=a.depth||0;return'style="padding-left:'+b*this.depthToIndent+'px;"'},destroy:function(){var a=this;delete a.view;delete a.prunedHeader},attachEvents:function(){var b=this,a=b.view;a.on({scope:b,groupclick:b.onGroupClick,rowfocus:b.onRowFocus});a.mon(a.store,"groupchange",b.onGroupChange,b);if(b.enableGroupingMenu){b.injectGroupingMenu()}b.pruneGroupedHeader();b.lastGroupField=b.getGroupField();b.block();b.onGroupChange();b.unblock()},injectGroupingMenu:function(){var b=this,a=b.view,c=a.headerCt;c.showMenuBy=b.showMenuBy;c.getMenuItems=b.getMenuItems()},showMenuBy:function(b,e){var d=this.getMenu(),c=d.down("#groupMenuItem"),a=e.groupable===false?"disable":"enable";c[a]();Ext.grid.header.Container.prototype.showMenuBy.apply(this,arguments)},getMenuItems:function(){var e=this,b=e.groupByText,d=e.disabled,a=e.showGroupsText,c=e.enableNoGroups,h=Ext.Function.bind(e.onGroupMenuItemClick,e),g=Ext.Function.bind(e.onGroupToggleMenuItemClick,e);return function(){var i=Ext.grid.header.Container.prototype.getMenuItems.call(this);i.push("-",{iconCls:Ext.baseCSSPrefix+"group-by-icon",itemId:"groupMenuItem",text:b,handler:h});if(c){i.push({itemId:"groupToggleMenuItem",text:a,checked:!d,checkHandler:g})}return i}},onGroupMenuItemClick:function(c,h){var d=this,i=c.parentMenu,j=i.activeHeader,a=d.view,b=a.store,g=b.remoteGroup;delete d.lastGroupIndex;d.block();d.enable();b.group(j.dataIndex);d.pruneGroupedHeader();d.unblock();if(!g){a.refresh()}},block:function(){this.blockRefresh=this.view.blockRefresh=true},unblock:function(){this.blockRefresh=this.view.blockRefresh=false},onGroupToggleMenuItemClick:function(a,b){this[b?"enable":"disable"]()},pruneGroupedHeader:function(){var a=this,b=a.getGroupedHeader();if(a.hideGroupedHeader&&b){if(a.prunedHeader){a.prunedHeader.show()}a.prunedHeader=b;b.hide()}},getGroupedHeader:function(){var a=this.getGroupField(),b=this.view.headerCt;return a?b.down("[dataIndex="+a+"]"):null},getGroupField:function(){var a=this.view.store.groupers.first();if(a){return a.property}return""},onRowFocus:function(c){var b=this.view.getNode(c),a=Ext.fly(b).up("."+this.collapsedCls);if(a){this.expand(a)}},expand:function(e,g){var d=this,b=d.view,c=b.up("gridpanel"),a;if(Ext.isString(e)){e=Ext.get(b.id+"-gp-"+e)}a=Ext.getDom(e);d.collapsedState[a.id]=false;e.removeCls(d.collapsedCls);e.prev().removeCls(d.hdCollapsedCls);if(g!==true){b.refreshHeight()}b.fireEvent("groupexpand")},expandAll:function(){var b=this,a=b.view;a.el.select(b.eventSelector).each(function(c){b.expand(c.next(),true)});a.refreshHeight()},collapse:function(e,g){var d=this,b=d.view,c=b.up("gridpanel"),a;if(Ext.isString(e)){e=Ext.get(b.id+"-gp-"+e)}a=Ext.getDom(e);d.collapsedState[a.id]=true;e.addCls(d.collapsedCls);e.prev().addCls(d.hdCollapsedCls);if(g!==true){b.refreshHeight()}b.fireEvent("groupcollapse")},collapseAll:function(){var b=this,a=b.view;a.el.select(b.eventSelector).each(function(c){b.collapse(c.next(),true)});a.refreshHeight()},onGroupChange:function(){var d=this,e=d.getGroupField(),c,a,b;if(d.hideGroupedHeader){if(d.lastGroupField){c=d.getMenuItem(d.lastGroupField);if(c){c.setChecked(true)}}if(e){a=d.view.headerCt.getVisibleGridColumns();b=((a.length===1)&&(a[0].dataIndex==e));c=d.getMenuItem(e);if(c&&!b){c.setChecked(false)}}}if(d.blockRefresh!==true){d.view.refresh()}d.lastGroupField=e},getMenuItem:function(b){var a=this.view,d=a.headerCt.down("gridcolumn[dataIndex="+b+"]"),c=a.headerCt.getMenu();return d?c.down("menuitem[headerId="+d.id+"]"):null},onGroupClick:function(c,i,a,j,h){var g=this,d=g.toggleCls,b=Ext.fly(i.nextSibling,"_grouping");if(b.hasCls(g.collapsedCls)){g.expand(b)}else{g.collapse(b)}},getMetaRowTplFragments:function(){return{isRow:this.isRow,closeRow:this.closeRow}},isRow:function(){return"<tpl if=\"typeof rows === 'undefined'\">"},closeRow:function(){return"</tpl>"},mutateMetaRowTpl:function(a){a.unshift("{[this.isRow()]}");a.push("{[this.closeRow()]}")},getAdditionalData:function(e,j,g,i){var h=this.view,d=h.headerCt,c=d.items.getAt(0),b={},a=c.id+"-tdAttr";b[a]=this.indentByDepth(e)+" "+(i[a]?i[a]:"");b.collapsed="true";b.data=g.getData();return b},getGroupRows:function(k,c,l,j){var h=this,b=k.children,m=k.rows=[],i=h.view,e=h.getGroupedHeader(),a=h.getGroupField(),g=-1,d;k.viewId=i.id;Ext.Array.each(c,function(o,n){if(o.get(a)==k.name){g=n}if(Ext.Array.indexOf(b,o)!=-1){m.push(Ext.apply(l[n],{depth:1}))}});delete k.children;k.fullWidth=j;k.columnName=e?e.text:a;k.rawName=k.name;if(e&&g>-1){k.name=l[g][e.id]}if(h.collapsedState[i.id+"-gp-"+k.name]){k.collapsedCls=h.collapsedCls;k.hdCollapsedCls=h.hdCollapsedCls}return k},collectData:function(d,c,i,h,g){var e=this,b=e.view.store,a;if(!e.disabled&&b.isGrouped()){a=b.getGroups();Ext.Array.each(a,function(k,j){e.getGroupRows(k,d,c,h)},e);return{rows:a,fullWidth:h}}return g},getFireEventArgs:function(g,h,d,c){var j=[g,h,d],i=Ext.fly(d.nextSibling,"_grouping"),a=Ext.getDom(i).id,b=h.id+"-gp-",k=a.substr(b.length);j.push(k,c);return j}});Ext.define("Ext.grid.feature.RowBody",{extend:"Ext.grid.feature.Feature",alias:"feature.rowbody",rowBodyHiddenCls:Ext.baseCSSPrefix+"grid-row-body-hidden",rowBodyTrCls:Ext.baseCSSPrefix+"grid-rowbody-tr",rowBodyTdCls:Ext.baseCSSPrefix+"grid-cell-rowbody",rowBodyDivCls:Ext.baseCSSPrefix+"grid-rowbody",eventPrefix:"rowbody",eventSelector:"."+Ext.baseCSSPrefix+"grid-rowbody-tr",getRowBody:function(a){return['<tr class="'+this.rowBodyTrCls+' {rowBodyCls}">','<td class="'+this.rowBodyTdCls+'" colspan="{rowBodyColspan}">','<div class="'+this.rowBodyDivCls+'">{rowBody}</div>',"</td>","</tr>"].join("")},getMetaRowTplFragments:function(){return{getRowBody:this.getRowBody,rowBodyTrCls:this.rowBodyTrCls,rowBodyTdCls:this.rowBodyTdCls,rowBodyDivCls:this.rowBodyDivCls}},mutateMetaRowTpl:function(a){a.push("{[this.getRowBody(values)]}")},getAdditionalData:function(c,a,b,g){var d=this.view.headerCt,e=d.getColumnCount();return{rowBody:"",rowBodyCls:this.rowBodyCls,rowBodyColspan:e}}});Ext.define("Ext.grid.feature.RowWrap",{extend:"Ext.grid.feature.Feature",alias:"feature.rowwrap",hasFeatureEvent:false,init:function(){if(!this.disabled){this.enable()}},getRowSelector:function(){return"tr:has(> "+this.view.cellSelector+")"},enable:function(){var b=this,a=b.view;b.callParent();b.savedRowSelector=a.rowSelector;a.rowSelector=b.getRowSelector();a.onHeaderResize=Ext.Function.createSequence(a.onHeaderResize,b.onHeaderResize,b)},disable:function(){var c=this,a=c.view,b=c.savedRowSelector;c.callParent();if(b){a.rowSelector=b}delete c.savedRowSelector;delete a.onHeaderResize},mutateMetaRowTpl:function(a){var b=Ext.baseCSSPrefix;a[0]=a[0].replace(b+"grid-row","");a[0]=a[0].replace("{[this.embedRowCls()]}","");a.unshift('<table class="'+b+"grid-table "+b+'grid-table-resizer" style="width: {[this.embedFullWidth()]}px;">');a.unshift('<tr class="'+b+'grid-row {[this.embedRowCls()]}"><td colspan="{[this.embedColSpan()]}"><div class="'+b+'grid-rowwrap-div">');a.push("</table>");a.push("</div></td></tr>")},embedColSpan:function(){return"{colspan}"},embedFullWidth:function(){return"{fullWidth}"},getAdditionalData:function(h,p,k,m){var d=this.view.headerCt,c=d.getColumnCount(),n=d.getFullWidth(),l=d.query("gridcolumn"),q=l.length,g=0,b={colspan:c,fullWidth:n},a,j,e;for(;g<q;g++){a=l[g].id;j=a+"-tdCls";e=Ext.baseCSSPrefix+"grid-col-resizer-"+a;b[j]=e+" "+(m[j]?m[j]:"");b[a+"-tdAttr"]=' style="width: '+(l[g].hidden?0:l[g].getDesiredWidth())+'px;" ';if(m[a+"-tdAttr"]){b[a+"-tdAttr"]+=m[a+"-tdAttr"]}}return b},getMetaRowTplFragments:function(){return{embedFullWidth:this.embedFullWidth,embedColSpan:this.embedColSpan}},onHeaderResize:function(d,a,c){var b=this.view.el;if(b){b.select("td."+Ext.baseCSSPrefix+"grid-col-resizer-"+d.id).setWidth(a)}}});Ext.define("Ext.grid.plugin.DragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.gridviewdragdrop",uses:["Ext.view.DragZone","Ext.grid.ViewDropZone"],dragText:"{0} selected row{1}",ddGroup:"GridDD",enableDrop:true,enableDrag:true,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},enable:function(){var a=this;if(a.dragZone){a.dragZone.unlock()}if(a.dropZone){a.dropZone.unlock()}a.callParent()},disable:function(){var a=this;if(a.dragZone){a.dragZone.lock()}if(a.dropZone){a.dropZone.lock()}a.callParent()},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=new Ext.view.DragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText})}if(b.enableDrop){b.dropZone=new Ext.grid.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup})}}});Ext.define("Ext.grid.plugin.HeaderResizer",{extend:"Ext.util.Observable",requires:["Ext.dd.DragTracker","Ext.util.Region"],alias:"plugin.gridheaderresizer",disabled:false,config:{dynamic:false},colHeaderCls:Ext.baseCSSPrefix+"column-header",minColWidth:40,maxColWidth:1000,wResizeCursor:"col-resize",eResizeCursor:"col-resize",init:function(a){this.headerCt=a;a.on("render",this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,"mousemove",this.onHeaderCtMouseMove,this);this.tracker=new Ext.dd.DragTracker({disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(b,k){var d=this,a;if(d.headerCt.dragging){if(d.activeHd){d.activeHd.el.dom.style.cursor="";delete d.activeHd}}else{var i=b.getTarget("."+d.colHeaderCls,3,true),j,g,c,h;if(i){j=Ext.getCmp(i.id);if(j.isOnLeftEdge(b)){g=j.previousNode("gridcolumn:not([hidden])");if(g){h=d.headerCt.up("tablepanel");c=g.up("tablepanel");if(!((c===h)||((h.ownerCt.isXType("tablepanel"))&&h.ownerCt.view.lockedGrid===c))){g=null}}}else{if(j.isOnRightEdge(b)){g=j}else{g=null}}if(g){if(g.isGroupHeader){a=g.getGridColumns();g=a[a.length-1]}if(g&&!(g.fixed||(g.resizable===false)||d.disabled)){d.activeHd=g;j.el.dom.style.cursor=d.eResizeCursor}}else{j.el.dom.style.cursor="";delete d.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&&!Ext.fly(a).hasCls(Ext.baseCSSPrefix+"column-header-trigger")&&!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var c=this,a=c.dragHd.el,d=Ext.util.Region.getRegion(a),b;if(c.headerCt.forceFit){b=c.dragHd.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])")}return d.adjust(0,c.headerCt.forceFit?(b?b.getWidth()-c.minColWidth:0):c.maxColWidth-a.getWidth(),0,c.minColWidth)},onStart:function(u){var v=this,h=v.dragHd,b=h.el,o=b.getWidth(),j=v.headerCt,l=u.getTarget();if(v.dragHd&&!Ext.fly(l).hasCls(Ext.baseCSSPrefix+"column-header-trigger")){j.dragging=true}v.origWidth=o;if(!v.dynamic){var d=b.getXY(),r=j.up("[scrollerOwner]"),g=v.dragHd.up(":not([isGroupHeader])"),k=g.up(),c=r.getLhsMarker(),n=r.getRhsMarker(),a=n.parent(),i=a.getLeft(true),s=a.getTop(true),q=a.translatePoints(d),p=k.body.getHeight()+j.getHeight(),m=q.top-s;c.setTop(m);n.setTop(m);c.setHeight(p);n.setHeight(p);c.setLeft(q.left-i);n.setLeft(q.left+o-i)}},onDrag:function(h){if(!this.dynamic){var g=this.tracker.getXY("point"),a=this.headerCt.up("[scrollerOwner]"),i=a.getRhsMarker(),c=i.parent(),b=c.translatePoints(g),d=c.getLeft(true);i.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(h){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var g=this.dragHd,c=this.headerCt.up("[scrollerOwner]"),d=c.getLhsMarker(),j=c.getRhsMarker(),a=g.getWidth(),i=this.tracker.getOffset("point"),b=-9999;d.setLeft(b);j.setLeft(b)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset("point");if(b.flex){delete b.flex}Ext.suspendLayouts();b.setWidth(this.origWidth+c[0]);if(this.headerCt.forceFit){a=b.nextNode("gridcolumn:not([hidden]):not([isGroupHeader])");if(a){delete a.flex;a.setWidth(a.getWidth()-c[0])}}Ext.resumeLayouts(true)}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define("Ext.layout.container.boxOverflow.None",{alternateClassName:"Ext.layout.boxOverflow.None",constructor:function(b,a){this.layout=b;Ext.apply(this,a)},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,completeLayout:function(b){var a=this,c=b.state.boxPlan,d;if(c.tooNarrow){d=a.handleOverflow(b);if(d){if(d.reservedSpace){a.layout.publishInnerCtSize(b,d.reservedSpace)}}}else{a.clearOverflow()}},onRemove:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)},getPrefixConfig:Ext.emptyFn,getSuffixConfig:Ext.emptyFn,getOverflowCls:function(){return""}});Ext.define("Ext.panel.Proxy",{alternateClassName:"Ext.dd.PanelProxy",moveOnDrag:true,constructor:function(a,b){var c=this;c.panel=a;c.id=c.panel.id+"-ddproxy";Ext.apply(c,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){var a=this;if(a.ghost){if(a.proxy){a.proxy.remove();delete a.proxy}a.panel.unghost(null,a.moveOnDrag);delete a.ghost}},show:function(){var b=this,a;if(!b.ghost){a=b.panel.getSize();b.panel.el.setVisibilityMode(Ext.Element.DISPLAY);b.ghost=b.panel.ghost();if(b.insertProxy){b.proxy=b.panel.el.insertSibling({cls:Ext.baseCSSPrefix+"panel-dd-spacer"});b.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();Ext.callback(c,a||this)},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define("Ext.resizer.Resizer",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.resizer.ResizeTracker","Ext.Component"],alternateClassName:"Ext.Resizable",handleCls:Ext.baseCSSPrefix+"resizable-handle",pinnedCls:Ext.baseCSSPrefix+"resizable-pinned",overCls:Ext.baseCSSPrefix+"resizable-over",wrapCls:Ext.baseCSSPrefix+"resizable-wrap",dynamic:true,handles:"s e se",height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"},constructor:function(b){var k=this,j,p,o=k.handles,c,n,g,d=0,m,l=[],h,a,e;k.addEvents("beforeresize","resizedrag","resize");if(Ext.isString(b)||Ext.isElement(b)||b.dom){j=b;b=arguments[1]||{};b.target=j}k.mixins.observable.constructor.call(k,b);j=k.target;if(j){if(j.isComponent){k.el=j.getEl();if(j.minWidth){k.minWidth=j.minWidth}if(j.minHeight){k.minHeight=j.minHeight}if(j.maxWidth){k.maxWidth=j.maxWidth}if(j.maxHeight){k.maxHeight=j.maxHeight}if(j.floating){if(!k.hasOwnProperty("handles")){k.handles="n ne e se s sw w nw"}}}else{k.el=k.target=Ext.get(j)}}else{k.target=k.el=Ext.get(k.el)}p=k.el.dom.tagName;if(p=="TEXTAREA"||p=="IMG"){k.originalTarget=k.target.isComponent?k.target.getEl():k.target;k.target=k.el=k.el.wrap({cls:k.wrapCls,id:k.el.id+"-rzwrap"});k.el.setPositioning(k.originalTarget.getPositioning());k.originalTarget.clearPositioning();e=k.originalTarget.getBox();k.el.setBox(e)}k.el.position();if(k.pinned){k.el.addCls(k.pinnedCls)}k.resizeTracker=new Ext.resizer.ResizeTracker({disabled:k.disabled,target:k.target,constrainTo:k.constrainTo,overCls:k.overCls,throttle:k.throttle,originalTarget:k.originalTarget,delegate:"."+k.handleCls,dynamic:k.dynamic,preserveRatio:k.preserveRatio,heightIncrement:k.heightIncrement,widthIncrement:k.widthIncrement,minHeight:k.minHeight,maxHeight:k.maxHeight,minWidth:k.minWidth,maxWidth:k.maxWidth});k.resizeTracker.on({mousedown:k.onBeforeResize,drag:k.onResize,dragend:k.onResizeEnd,scope:k});if(k.handles=="all"){k.handles="n s e w ne nw se sw"}o=k.handles=k.handles.split(/ |\s*?[,;]\s*?/);n=k.possiblePositions;g=o.length;c=k.handleCls+" "+(k.target.isComponent?(k.target.baseCls+"-handle "):"")+k.handleCls+"-";if(Ext.isIE6){h=' style="height:'+k.el.getHeight()+'px"'}for(;d<g;d++){if(o[d]&&n[o[d]]){m=n[o[d]];if(m==="east"||m==="west"){a=h}else{a=""}l.push('<div id="'+k.el.id+"-"+m+'-handle" class="'+c+m+" "+Ext.baseCSSPrefix+'unselectable"'+a+"></div>")}}Ext.DomHelper.append(k.el,l.join(""));for(d=0;d<g;d++){if(o[d]&&n[o[d]]){m=n[o[d]];k[m]=k.el.getById(k.el.id+"-"+m+"-handle");k[m].region=m;k[m].unselectable();if(k.transparent){k[m].setOpacity(0)}}}if(Ext.isNumber(k.width)){k.width=Ext.Number.constrain(k.width,k.minWidth,k.maxWidth)}if(Ext.isNumber(k.height)){k.height=Ext.Number.constrain(k.height,k.minHeight,k.maxHeight)}if(k.width!==null||k.height!==null){if(k.originalTarget){k.originalTarget.setWidth(k.width);k.originalTarget.setHeight(k.height)}k.resizeTo(k.width,k.height)}},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(b,c){var a=this.target.getBox();return this.fireEvent("beforeresize",this,a.width,a.height,c)},onResize:function(c,d){var b=this,a=b.target.getBox();b.forceHandlesHeight();return b.fireEvent("resizedrag",b,a.width,a.height,d)},onResizeEnd:function(c,d){var b=this,a=b.target.getBox();b.forceHandlesHeight();return b.fireEvent("resize",b,a.width,a.height,d)},resizeTo:function(b,a){this.target.setSize(b,a);this.fireEvent("resize",this,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var d=0,c=this.handles,a=c.length,b=this.possiblePositions;for(;d<a;d++){this[b[c[d]]].remove()}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define("Ext.resizer.ResizeTracker",{extend:"Ext.dd.DragTracker",dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+"resizable-proxy",constructor:function(b){var d=this;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&&d.minWidth&&d.minHeight){var c=d.minWidth/d.el.getWidth(),a=d.minHeight/d.el.getHeight();if(a>c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){var e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(h,i,g){if(g){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"reset"})}b=c.createProxy({tag:"div",cls:a,id:c.id+"-rzproxy"},d)}b.removeCls(Ext.baseCSSPrefix+"proxy-el");return b},onStart:function(a){this.activeResizeHandle=Ext.get(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:"none",vertical:"none"})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(s,m){var t=this,c=t.activeResizeHandle.region,g=t.getOffset(t.constrainTo?"dragTarget":null),k=t.startBox,h,p=0,u=0,j,q,a=0,w=0,v,n=g[0]<0?"right":"left",r=g[1]<0?"down":"up",i,b;switch(c){case"south":u=g[1];b=2;break;case"north":u=-g[1];w=-u;b=2;break;case"east":p=g[0];b=1;break;case"west":p=-g[0];a=-p;b=1;break;case"northeast":u=-g[1];w=-u;p=g[0];i=[k.x,k.y+k.height];b=3;break;case"southeast":u=g[1];p=g[0];i=[k.x,k.y];b=3;break;case"southwest":p=-g[0];a=-p;u=g[1];i=[k.x+k.width,k.y];b=3;break;case"northwest":u=-g[1];w=-u;p=-g[0];a=-p;i=[k.x+k.width,k.y+k.height];b=3;break}var d={width:k.width+p,height:k.height+u,x:k.x+a,y:k.y+w};j=Ext.Number.snap(d.width,t.widthIncrement);q=Ext.Number.snap(d.height,t.heightIncrement);if(j!=d.width||q!=d.height){switch(c){case"northeast":d.y-=q-d.height;break;case"north":d.y-=q-d.height;break;case"southwest":d.x-=j-d.width;break;case"west":d.x-=j-d.width;break;case"northwest":d.x-=j-d.width;d.y-=q-d.height}d.width=j;d.height=q}if(d.width<t.minWidth||d.width>t.maxWidth){d.width=Ext.Number.constrain(d.width,t.minWidth,t.maxWidth);if(a){d.x=k.x+(k.width-d.width)}}else{t.lastX=d.x}if(d.height<t.minHeight||d.height>t.maxHeight){d.height=Ext.Number.constrain(d.height,t.minHeight,t.maxHeight);if(w){d.y=k.y+(k.height-d.height)}}else{t.lastY=d.y}if(t.preserveRatio||s.shiftKey){var o,l;h=t.startBox.width/t.startBox.height;o=Math.min(Math.max(t.minHeight,d.width/h),t.maxHeight);l=Math.min(Math.max(t.minWidth,d.height*h),t.maxWidth);if(b==1){d.height=o}else{if(b==2){d.width=l}else{v=Math.abs(i[0]-this.lastXY[0])/Math.abs(i[1]-this.lastXY[1]);if(v>h){d.height=o}else{d.width=l}if(c=="northeast"){d.y=k.y-(d.height-k.height)}else{if(c=="northwest"){d.y=k.y-(d.height-k.height);d.x=k.x-(d.width-k.width)}else{if(c=="southwest"){d.x=k.x-(d.width-k.width)}}}}}}if(u===0){r="none"}if(p===0){n="none"}t.resize(d,{horizontal:n,vertical:r},m)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){c.setSize(b.width,b.height);if(c.floating){c.setPagePosition(b.x,b.y)}}else{c.setBox(b);if(this.originalTarget){this.originalTarget.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define("Ext.resizer.SplitterTracker",{extend:"Ext.dd.DragTracker",requires:["Ext.util.Region"],enabled:true,overlayCls:Ext.baseCSSPrefix+"resizable-overlay",createDragOverlay:function(){var a;a=this.overlay=Ext.getBody().createChild({cls:this.overlayCls,html:"&#160;"});a.unselectable();a.setSize(Ext.Element.getViewWidth(true),Ext.Element.getViewHeight(true));a.show()},getPrevCmp:function(){var a=this.getSplitter();return a.previousSibling()},getNextCmp:function(){var a=this.getSplitter();return a.nextSibling()},onBeforeStart:function(i){var d=this,g=d.getPrevCmp(),a=d.getNextCmp(),c=d.getSplitter().collapseEl,h=i.getTarget(),b;if(c&&h===d.getSplitter().collapseEl.dom){return false}if(a.collapsed||g.collapsed){return false}d.prevBox=g.getEl().getBox();d.nextBox=a.getEl().getBox();d.constrainTo=b=d.calculateConstrainRegion();if(!b){return false}d.createDragOverlay();return b},onStart:function(b){var a=this.getSplitter();a.addCls(a.baseCls+"-active")},calculateConstrainRegion:function(){var g=this,a=g.getSplitter(),h=a.getWidth(),i=a.defaultSplitMin,b=a.orientation,d=g.prevBox,j=g.getPrevCmp(),c=g.nextBox,e=g.getNextCmp(),l,k;if(b==="vertical"){l=new Ext.util.Region(d.y,(j.maxWidth?d.x+j.maxWidth:c.right-(e.minWidth||i))+h,d.bottom,d.x+(j.minWidth||i));k=new Ext.util.Region(c.y,c.right-(e.minWidth||i),c.bottom,(e.maxWidth?c.right-e.maxWidth:d.x+(d.minWidth||i))-h)}else{l=new Ext.util.Region(d.y+(j.minHeight||i),d.right,(j.maxHeight?d.y+j.maxHeight:c.bottom-(e.minHeight||i))+h,d.x);k=new Ext.util.Region((e.maxHeight?c.bottom-e.maxHeight:d.y+(j.minHeight||i))-h,c.right,c.bottom-(e.minHeight||i),c.x)}return l.intersect(k)},performResize:function(m,g){var o=this,a=o.getSplitter(),h=a.orientation,p=o.getPrevCmp(),n=o.getNextCmp(),b=a.ownerCt,k=b.query(">[flex]"),l=k.length,j=0,d,q,c=0;for(;j<l;j++){q=k[j].getWidth();c+=q;k[j].flex=q}g=g||o.getOffset("dragTarget");if(h==="vertical"){g=g[0];d="width"}else{d="height";g=g[1]}if(p){q=o.prevBox[d]+g;if(p.flex){p.flex=q}else{p[d]=q}}if(n){q=o.nextBox[d]-g;if(n.flex){n.flex=q}else{n[d]=q}}b.updateLayout()},endDrag:function(){var a=this;if(a.overlay){a.overlay.remove();delete a.overlay}a.callParent(arguments)},onEnd:function(c){var a=this,b=a.getSplitter();b.removeCls(b.baseCls+"-active");a.performResize(c,a.getOffset("dragTarget"))},onDrag:function(g){var c=this,h=c.getOffset("dragTarget"),d=c.getSplitter(),b=d.getEl(),a=d.orientation;if(a==="vertical"){b.setX(c.startRegion.left+h[0])}else{b.setY(c.startRegion.top+h[1])}},getSplitter:function(){return this.splitter}});Ext.define("Ext.slider.Thumb",{requires:["Ext.dd.DragTracker","Ext.util.Format"],topZIndex:10000,constructor:function(a){var b=this;Ext.apply(b,a||{},{cls:Ext.baseCSSPrefix+"slider-thumb",constrain:false});b.callParent([a])},render:function(){var a=this;a.el=a.slider.innerEl.insertFirst(a.getElConfig());a.onRender()},onRender:function(){if(this.disabled){this.disable()}this.initEvents()},getElConfig:function(){var c=this,b=c.slider,a={};a[b.vertical?"bottom":"left"]=b.calculateThumbPosition(b.normalizeValue(c.value))+"%";return{style:a,id:this.id,cls:this.cls}},move:function(c,b){var d=this.el,a=this.slider.vertical?"bottom":"left",g,e;c+="%";if(!b){d.dom.style[a]=c}else{g={};g[a]=c;if(!Ext.supports.GetPositionPercentage){e={};e[a]=d.dom.style[a]}new Ext.fx.Anim({target:d,duration:350,from:e,to:g})}},bringToFront:function(){this.el.setStyle("zIndex",this.topZIndex)},sendToBack:function(){this.el.setStyle("zIndex","")},enable:function(){var a=this;a.disabled=false;if(a.el){a.el.removeCls(a.slider.disabledCls)}},disable:function(){var a=this;a.disabled=true;if(a.el){a.el.addCls(a.slider.disabledCls)}},initEvents:function(){var b=this,a=b.el;b.tracker=new Ext.dd.DragTracker({onBeforeStart:Ext.Function.bind(b.onBeforeDragStart,b),onStart:Ext.Function.bind(b.onDragStart,b),onDrag:Ext.Function.bind(b.onDrag,b),onEnd:Ext.Function.bind(b.onDragEnd,b),tolerance:3,autoStart:300,overCls:Ext.baseCSSPrefix+"slider-thumb-over"});b.tracker.initEl(a)},onBeforeDragStart:function(a){if(this.disabled){return false}else{this.slider.promoteThumb(this);return true}},onDragStart:function(b){var a=this;a.el.addCls(Ext.baseCSSPrefix+"slider-thumb-drag");a.dragging=true;a.dragStartValue=a.value;a.slider.fireEvent("dragstart",a.slider,b,a)},onDrag:function(h){var d=this,c=d.slider,b=d.index,g=d.getValueFromTracker(),a,i;if(g!==undefined){if(d.constrain){a=c.thumbs[b+1];i=c.thumbs[b-1];if(i!==undefined&&g<=i.value){g=i.value}if(a!==undefined&&g>=a.value){g=a.value}}c.setValue(b,g,false);c.fireEvent("drag",c,h,d)}},getValueFromTracker:function(){var a=this.slider,b=a.getTrackpoint(this.tracker.getXY());if(b!==undefined){return Ext.util.Format.round(a.reversePixelValue(b),a.decimalPrecision)}},onDragEnd:function(d){var b=this,a=b.slider,c=b.value;b.el.removeCls(Ext.baseCSSPrefix+"slider-thumb-drag");b.dragging=false;a.fireEvent("dragend",a,d);if(b.dragStartValue!=c){a.fireEvent("changecomplete",a,c,b)}},destroy:function(){Ext.destroy(this.tracker)}});Ext.define("Ext.tree.plugin.TreeViewDragDrop",{extend:"Ext.AbstractPlugin",alias:"plugin.treeviewdragdrop",uses:["Ext.tree.ViewDragZone","Ext.tree.ViewDropZone"],dragText:"{0} selected node{1}",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,ddGroup:"TreeDD",expandDelay:1000,enableDrop:true,enableDrag:true,nodeHighlightColor:"c3daf9",nodeHighlightOnDrop:Ext.enableFx,nodeHighlightOnRepair:Ext.enableFx,init:function(a){a.on("render",this.onViewRender,this,{single:true})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onViewRender:function(a){var b=this;if(b.enableDrag){b.dragZone=new Ext.tree.ViewDragZone({view:a,ddGroup:b.dragGroup||b.ddGroup,dragText:b.dragText,repairHighlightColor:b.nodeHighlightColor,repairHighlight:b.nodeHighlightOnRepair})}if(b.enableDrop){b.dropZone=new Ext.tree.ViewDropZone({view:a,ddGroup:b.dropGroup||b.ddGroup,allowContainerDrops:b.allowContainerDrops,appendOnly:b.appendOnly,allowParentInserts:b.allowParentInserts,expandDelay:b.expandDelay,dropHighlightColor:b.nodeHighlightColor,dropHighlight:b.nodeHighlightOnDrop})}}});Ext.define("Ext.util.Animate",{uses:["Ext.fx.Manager","Ext.fx.Anim"],animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(new Ext.fx.Anim(b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,"stopAnimation"),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,"getActiveAnimation"),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define("Ext.util.ClickRepeater",{extend:"Ext.util.Observable",constructor:function(b,a){this.el=Ext.get(b);this.el.unselectable();Ext.apply(this,a);this.addEvents("mousedown","click","mouseup");if(!this.disabled){this.disabled=true;this.enable()}if(this.handler){this.on("click",this.handler,this.scope||this)}this.callParent()},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on("mousedown",this.handleMouseDown,this);if(Ext.isIE){this.el.on("dblclick",this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on("click",this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un("mouseup",this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?"disable":"enable"]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on("mouseup",this.handleMouseUp,this);this.el.on("mouseout",this.handleMouseOut,this);this.fireEvent("mousedown",this,a);this.fireEvent("click",this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent("click",this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,h,g){return(e==g)?a+h:h*(-Math.pow(2,-10*e/g)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on("mouseover",this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un("mouseover",this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un("mouseover",this.handleMouseReturn,this);this.el.un("mouseout",this.handleMouseOut,this);Ext.getDoc().un("mouseup",this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent("mouseup",this,a)}});Ext.define("Ext.util.ComponentDragger",{extend:"Ext.dd.DragTracker",autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.el.getXY();if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}},calculateConstrainRegion:function(){var d=this,a=d.comp,h=d.initialConstrainTo,e,g,b=a.el.shadow?a.el.shadow.offset:0;if(!(h instanceof Ext.util.Region)){h=Ext.fly(h).getViewRegion()}if(b){h.adjust(0,-b,-b,b)}if(!d.constrainDelegate){e=Ext.fly(d.dragTarget).getRegion();g=d.proxy?d.proxy.el.getRegion():a.el.getRegion();h.adjust(e.top-g.top,e.right-g.right,e.bottom-g.bottom,e.left-g.left)}return h},onDrag:function(c){var b=this,a=(b.proxy&&!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?"dragTarget":null);a.setPagePosition(b.startPosition[0]+d[0],b.startPosition[1]+d[1])},onEnd:function(a){if(this.proxy&&!this.comp.liveDrag){this.comp.unghost()}}});Ext.define("Ext.util.Cookies",{singleton:true,set:function(c,e){var a=arguments,i=arguments.length,b=(i>2)?a[2]:null,h=(i>3)?a[3]:"/",d=(i>4)?a[4]:null,g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=",g=b.length,a=document.cookie.length,e=0,c=0;while(e<a){c=e+g;if(document.cookie.substring(e,c)==b){return this.getCookieVal(c)}e=document.cookie.indexOf(" ",e)+1;if(e===0){break}}return null},clear:function(a,b){if(this.get(a)){b=b||"/";document.cookie=a+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path="+b}},getCookieVal:function(b){var a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}return unescape(document.cookie.substring(b,a))}});Ext.define("Ext.util.CSS",function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,g){return g.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(i,l){var h,g=c.getElementsByTagName("head")[0],k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=document.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(i,e){var h=document;this.removeStyleSheet(i);var g=h.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",i);g.setAttribute("href",e);h.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(l){if(!d){d={}}try{var o=l.cssRules||l.rules,m,k=o.length-1,g,h;for(;k>=0;--k){m=o[k].selectorText;if(m){m=m.split(",");h=m.length;for(g=0;g<h;g++){d[Ext.String.trim(m[g]).toLowerCase()]=o[k]}}}}catch(n){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets,j=0,g=k.length;for(;j<g;j++){try{if(!k[j].disabled){this.cacheStyleSheet(k[j])}}catch(l){}}}return d},getRule:function(e,h){var g=this.getRules(h);if(!Ext.isArray(e)){return g[e.toLowerCase()]}for(var j=0;j<e.length;j++){if(g[e[j]]){return g[e[j].toLowerCase()]}}return null},updateRule:function(e,j,h){if(!Ext.isArray(e)){var k=this.getRule(e);if(k){k.style[j.replace(b,a)]=h;return true}}else{for(var g=0;g<e.length;g++){if(this.updateRule(e[g],j,h)){return true}}}return false}}}());Ext.define("Ext.util.Floating",{uses:["Ext.Layer","Ext.window.Window"],focusOnToFront:true,shadow:"sides",constructor:function(b){var a=this;a.el=new Ext.Layer(Ext.apply({hideMode:a.hideMode,hidden:a.hidden,shadow:(typeof a.shadow!="undefined")?a.shadow:"sides",shadowOffset:a.shadowOffset,constrain:false,shim:(a.shim===false)?false:undefined},a.floating),b);a.floating=true;a.registerWithOwnerCt()},registerWithOwnerCt:function(){var a=this;if(a.zIndexParent){a.zIndexParent.unregisterFloatingItem(a)}a.zIndexParent=a.up("[floating]");a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.registerWithManager!==false){if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&&!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false){a.showOnParentShow=a.isVisible();a.hide()}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},setZIndex:function(b){var c=this,a=c.loadMask;c.el.setZIndex(b);if(a&&a.onZIndexChange){a.onZIndexChange(b)}b+=10;if(c.floatingItems){b=Math.floor(c.floatingItems.setBase(b)/100)*100+10000}return b},doConstrain:function(b){var c=this,a=c.getConstrainVector(b||c.el.getScopeParent()),d;if(a){d=c.getPosition();d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(b){var c=this,a;if(c.constrain||c.constrainHeader){a=c.constrainHeader?c.header.el:c.el;b=b||(c.floatParent&&c.floatParent.getTargetEl())||c.container;return a.getConstrainVector(b)}},alignTo:function(b,a,c){this.setPagePosition(this.el.getAlignToXY(b.el||b,a,c));return this},toFront:function(b){var a=this;if(a.zIndexParent){a.zIndexParent.toFront(true)}if(a.zIndexManager.bringToFront(a)){if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(!b){a.focus(false,true)}}return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&&!a.maximized){a.el.enableShadow(true)}if(a.modal){a.focus(false,true)}a.fireEvent("activate",a)}else{if(a.isWindow&&(c&&c.isWindow)){a.el.disableShadow()}a.fireEvent("deactivate",a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b;if(a.isVisible()){b=a.el.getAlignToXY(a.container,"c-c");a.setPagePosition(b)}else{a.needsCenter=true}return a},onFloatShow:function(){if(this.needsCenter){this.center()}delete this.needsCenter},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this.floatParent,a=c?c.getTargetEl():this.container,b=a.getViewSize(false);this.setSize(b)}});Ext.define("Ext.util.History",{singleton:true,alternateClassName:"Ext.History",mixins:{observable:"Ext.util.Observable"},useTopWindow:true,constructor:function(){var a=this;a.oldIEMode=Ext.isIE6||Ext.isIE7||!Ext.isStrict&&Ext.isIE8;a.iframe=null;a.hiddenField=null;a.ready=false;a.currentToken=null},getHash:function(){var a=window.location.href,b=a.indexOf("#");return b>=0?a.substr(b+1):null},setHash:function(d){var a=this,c=a.useTopWindow?window.top:window;try{c.location.hash=d}catch(b){}},doSave:function(){this.hiddenField.value=this.currentToken},handleStateChange:function(a){this.currentToken=a;this.fireEvent("change",a)},updateIFrame:function(b){var a='<html><body><div id="state">'+Ext.util.Format.htmlEncode(b)+"</div></body></html>";try{var d=this.iframe.contentWindow.document;d.open();d.write(a);d.close();return true}catch(c){return false}},checkIFrame:function(){var d=this,b=d.iframe.contentWindow;if(!b||!b.document){Ext.Function.defer(this.checkIFrame,10,this);return}var e=b.document,c=e.getElementById("state"),a=c?c.innerText:null,g=d.getHash();Ext.TaskManager.start({run:function(){var k=b.document,j=k.getElementById("state"),h=j?j.innerText:null,i=d.getHash();if(h!==a){a=h;d.handleStateChange(h);d.setHash(h);g=h;d.doSave()}else{if(i!==g){g=i;d.updateIFrame(i)}}},interval:50,scope:d});d.ready=true;d.fireEvent("ready",d)},startUp:function(){var a=this;a.currentToken=a.hiddenField.value||this.getHash();if(a.oldIEMode){a.checkIFrame()}else{var b=a.getHash();Ext.TaskManager.start({run:function(){var c=a.getHash();if(c!==b){b=c;a.handleStateChange(b);a.doSave()}},interval:50,scope:a});a.ready=true;a.fireEvent("ready",a)}},fieldId:Ext.baseCSSPrefix+"history-field",iframeId:Ext.baseCSSPrefix+"history-frame",init:function(d,b){var c=this,a=Ext.DomHelper;if(c.ready){Ext.callback(d,b,[c]);return}if(!Ext.isReady){Ext.onReady(function(){c.init(d,b)});return}c.hiddenField=Ext.getDom(c.fieldId);if(!c.hiddenField){c.hiddenField=a.append(Ext.getBody(),{id:Ext.id(),tag:"form",cls:Ext.baseCSSPrefix+"hide-display",children:[{tag:"input",type:"hidden",id:c.fieldId}]}).firstChild}if(c.oldIEMode){c.iframe=Ext.getDom(c.iframeId);if(!c.iframe){c.iframe=a.append(c.hiddenField.parentNode,{tag:"iframe",id:c.iframeId})}}c.addEvents("ready","change");if(d){c.on("ready",d,b,{single:true})}c.startUp()},add:function(a,c){var b=this;if(c!==false){if(b.getToken()===a){return true}}if(b.oldIEMode){return b.updateIFrame(a)}else{b.setHash(a);return true}},back:function(){window.history.go(-1)},forward:function(){window.history.go(1)},getToken:function(){return this.ready?this.currentToken:this.getHash()}});Ext.define("Ext.util.KeyMap",{alternateClassName:"Ext.KeyMap",eventName:"keydown",constructor:function(a){var b=this;if((typeof a==="string")||a.dom||a.tagName||a.isComponent){b.legacyConstructor.apply(b,arguments);return}Ext.apply(b,a);b.bindings=[];if(!b.target.isComponent){b.target=Ext.get(b.target)}if(b.binding){b.addBinding(b.binding)}b.enable()},legacyConstructor:function(b,d,a){var c=this;Ext.apply(c,{target:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},addBinding:function(h){var g=h.key,j=false,d,e,b,c,a;if(Ext.isArray(h)){for(c=0,a=h.length;c<a;c++){this.addBinding(h[c])}return}if(Ext.isString(g)){e=[];b=g.toUpperCase();for(c=0,a=b.length;c<a;++c){e.push(b.charCodeAt(c))}g=e;j=true}if(!Ext.isArray(g)){g=[g]}if(!j){for(c=0,a=g.length;c<a;++c){d=g[c];if(Ext.isString(d)){g[c]=d.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:g},h))},handleKeyDown:function(d){var c=this;if(this.enabled){var e=this.bindings,b=0,a=e.length;d=c.processEvent.apply(c||c.processEventScope,arguments);if(!d.getKey){return d}for(;b<a;++b){this.processBinding(e[b],d)}}},processEvent:function(a){return a},processBinding:function(g,a){if(this.checkModifiers(g,a)){var h=a.getKey(),k=g.fn||g.handler,l=g.scope||this,j=g.keyCode,b=g.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=j.length;c<e;++c){if(h===j[c]){if(k.call(l,h,a)!==true&&b){d[b]()}break}}}},checkModifiers:function(j,g){var d=["shift","ctrl","alt"],c=0,a=d.length,h,b;for(;c<a;++c){b=d[c];h=j[b];if(!(h===undefined||(h===g[b+"Key"]))){return false}}return true},on:function(b,d,c){var h,a,e,g;if(Ext.isObject(b)&&!Ext.isArray(b)){h=b.key;a=b.shift;e=b.ctrl;g=b.alt}else{h=b}this.addBinding({key:h,shift:a,ctrl:e,alt:g,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){var a=this;if(!a.enabled){a.target.on(a.eventName,a.handleKeyDown,a);a.enabled=true}},disable:function(){var a=this;if(a.enabled){a.target.removeListener(a.eventName,a.handleKeyDown,a);a.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(b){var a=this;a.bindings=[];a.disable();if(b===true){a.target.isComponent?a.target.destroy():a.target.remove()}delete a.target}});Ext.define("Ext.util.KeyNav",{alternateClassName:"Ext.KeyNav",requires:["Ext.util.KeyMap"],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(a){var b=this;if(arguments.length===2){b.legacyConstructor.apply(b,arguments);return}b.setConfig(a)},legacyConstructor:function(b,a){this.setConfig(Ext.apply({target:b},a))},setConfig:function(b){var e=this,c={target:b.target,eventName:e.getKeyEvent("forceKeyDown" in b?b.forceKeyDown:e.forceKeyDown,b.eventName)};if(e.map){e.map.destroy()}if(b.processEvent){c.processEvent=b.processEvent;c.processEventScope=b.processEventScope||e}var g=e.map=new Ext.util.KeyMap(c),a=Ext.util.KeyNav.keyOptions,i=b.scope||e,d,h;for(d in a){if(a.hasOwnProperty(d)){if(h=b[d]){if(typeof h==="function"){h={handler:h,defaultAction:(b.defaultEventAction!==undefined)?b.defaultEventAction:e.defaultEventAction}}g.addBinding({key:a[d],handler:Ext.Function.bind(e.handleEvent,h.scope||i,h.handler||h.fn,true),defaultEventAction:(h.defaultEventAction!==undefined)?h.defaultAction:e.defaultEventAction})}}}g.disable();if(!b.disabled){g.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:"stopEvent",forceKeyDown:false,eventName:"keypress",destroy:function(a){this.map.destroy(a);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(b,a){if(b||(Ext.EventManager.useKeyDown&&!a)){return"keydown"}else{return a||this.eventName}}});Ext.define("Ext.util.TextMetrics",{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||"auto");return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"textmetrics"});this.el=Ext.get(a);b.position("absolute");b.setLeftTop(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update("");return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles("font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width="auto";return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define("Ext.ElementLoader",{mixins:{observable:"Ext.util.Observable"},uses:["Ext.data.Connection","Ext.Ajax"],statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents("beforeload","exception","load");c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&&a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(i){i=Ext.apply({},i);var e=this,d=e.target,j=Ext.isDefined(i.loadMask)?i.loadMask:e.loadMask,b=Ext.apply({},i.params),a=Ext.apply({},i.ajaxOptions),g=i.callback||e.callback,h=i.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(i,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(i,{url:e.url});Ext.apply(i,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent("beforeload",e,i)===false){return}if(j){e.addMask(j)}c=Ext.Ajax.request(i);e.active={request:c,options:i,mask:j,scope:h,callback:g,success:i.success||e.success,failure:i.failure||e.failure,renderer:i.renderer||e.renderer,scripts:Ext.isDefined(i.scripts)?i.scripts:e.scripts};e.setOptions(e.active,i)},setOptions:Ext.emptyFn,onComplete:function(b,h,a){var d=this,g=d.active,c=g.scope,e=d.getRenderer(g.renderer);if(h){h=e.call(d,d,a,g)}if(h){Ext.callback(g.success,c,[d,a,b]);d.fireEvent("load",d,a,b)}else{Ext.callback(g.failure,c,[d,a,b]);d.fireEvent("exception",d,a,b)}Ext.callback(g.callback,c,[d,h,a,b]);if(g.mask){d.removeMask()}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define("Ext.ComponentLoader",{extend:"Ext.ElementLoader",statics:{Renderer:{Data:function(a,b,d){var g=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){g=false}return g},Component:function(a,c,h){var i=true,g=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){i=false}if(i){if(h.removeAll){g.removeAll()}g.add(b)}return i}}},target:null,loadMask:false,renderer:"html",setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&&a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case"component":return a.Component;case"data":return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var c=this;c.body=["var c0=values, p0=parent, n0=xcount, i0=xindex;\n"];c.funcs=["var fm=Ext.util.Format;"];c.switches=[];c.parse(a);c.funcs.push((c.useEval?"$=":"return")+" function ("+c.fnArgs+") {",c.body.join(""),"}");var b=c.funcs.join("\n");return b},doText:function(a){this.body.push("out.push('",a.replace(this.aposRe,"\\'"),"')\n")},doExpr:function(a){this.body.push("out.push(String(",a,"))\n")},doTag:function(a){this.doExpr(this.parseTag(a))},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],g=d.switches.length-1,a,b;if(d.switches[g]){d.body.push("break;\n")}else{d.switches[g]++}for(b=0,g=c.length;b<g;++b){a=d.intRe.exec(c[b]);c[b]=a?a[1]:("'"+c[b].replace(d.aposRe,"\\'")+"'")}d.body.push("case ",c.join(": case "),":\n")},doDefault:function(){var a=this,b=a.switches.length-1;if(a.switches[b]){a.body.push("break;\n")}else{a.switches[b]++}a.body.push("default:\n")},doEnd:function(b,d){var c=this,a=c.level-1;if(b=="for"){if(d.exec){c.doExec(d.exec)}c.body.push("}\n");c.body.push("parent=p",a,";values=r",a+1,";xcount=n",a,";xindex=i",a,"\n")}else{if(b=="if"||b=="switch"){c.body.push("}\n")}}},doFor:function(e,g){var d=this,c=d.addFn(e),b=d.level,a=b-1;d.body.push("var c",b,"=",c,d.callFn,", a",b,"=Ext.isArray(c",b,"),p",b,"=(parent=c",a,"),r",b,"=values\n","for (var i",b,"=0,n",b,"=a",b,"?c",b,".length:(c",b,"?1:0), xcount=n",b,";i",b,"<n"+b+";++i",b,"){\n","values=a",b,"?c",b,"[i",b,"]:c",b,"\n","xindex=i",b,"+1\n")},doExec:function(c,d){var b=this,a="f"+b.funcs.length;b.funcs.push("function "+a+"("+b.fnArgs+") {"," try { with(values) {","  "+c," }} catch(e) {}","}");b.body.push(a+b.callFn+"\n")},addFn:function(a){var c=this,b="f"+c.funcs.length;if(a==="."){c.funcs.push("function "+b+"("+c.fnArgs+") {"," return values","}")}else{if(a===".."){c.funcs.push("function "+b+"("+c.fnArgs+") {"," return parent","}")}else{c.funcs.push("function "+b+"("+c.fnArgs+") {"," try { with(values) {","  return("+a+")"," }} catch(e) {}","}")}}return b},parseTag:function(b){var a=this.tagRe.exec(b),e=a[1],h=a[2],d=a[3],g=a[4],c;if(e=="."){c='Ext.Array.indexOf(["string", "number", "boolean"], typeof values) > -1 || Ext.isDate(values) ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e.substr(0,7)=="parent."){c=e}else{if((e.indexOf(".")!==-1)&&(e.indexOf("-")===-1)){c="values."+e}else{c="values['"+e+"']"}}}}if(g){c="("+c+g+")"}if(h&&this.useFormat){d=d?","+d:"";if(h.substr(0,5)!="this."){h="fm."+h+"("}else{h+="("}}else{d="";h="("+c+" === undefined ? '' : "}return h+c+d+")"},evalTpl:function($){eval($);return $},aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var a=this.prototype;a.fnArgs="out,values,parent,xindex,xcount";a.callFn=".call(this,"+a.fnArgs+")"});Ext.define("Ext.XTemplate",{extend:"Ext.Template",requires:"Ext.XTemplateCompiler",apply:function(a){return this.applyOut(a,[]).join("")},applyOut:function(a,b){var d=this,c;if(!d.fn){c=new Ext.XTemplateCompiler({useFormat:d.disableFormats!==true});d.fn=c.compile(d.html)}try{d.fn.call(d,b,a,{},1,1)}catch(g){}return b},compile:function(){return this},statics:{getTpl:function(a,c){var b=a[c],d;if(b&&!b.isTemplate){b=Ext.ClassManager.dynInstantiate("Ext.XTemplate",b);if(a.hasOwnProperty(c)){a[c]=b}else{for(d=a.self.prototype;d;d=d.superclass){if(d.hasOwnProperty(c)){d[c]=b;break}}}}return b||null}}});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.util.Observable"},onClassExtended:function(j,c,i){var h=Ext.getClassName(j),d=h.match(/^(.*)\.controller\./);if(d!==null){var b=Ext.Loader.getPrefix(h)||d[1],g=i.onBeforeCreated,k=[],a=["model","view","store"],e;i.onBeforeCreated=function(t,n){var o,q,l,r,m,p,s;for(o=0,q=a.length;o<q;o++){l=a[o];r=Ext.Array.from(n[l+"s"]);for(m=0,p=r.length;m<p;m++){s=r[m];e=Ext.Loader.getPrefix(s);if(e===""||e===s){k.push(b+"."+l+"."+s)}else{k.push(s)}}}Ext.require(k,Ext.Function.pass(g,arguments,this))}}},constructor:function(a){this.mixins.observable.constructor.call(this,a);Ext.apply(this,a||{});this.createGetters("model",this.models);this.createGetters("store",this.stores);this.createGetters("view",this.views);if(this.refs){this.ref(this.refs)}},init:function(a){},onLaunch:function(a){},createGetters:function(b,a){b=Ext.String.capitalize(b);Ext.Array.each(a,function(d){var c="get",e=d.split(".");Ext.Array.each(e,function(g){c+=Ext.String.capitalize(g)});c+=b;if(!this[c]){this[c]=Ext.Function.pass(this["get"+b],[d],this)}this[c](d)},this)},ref:function(a){var b=this;a=Ext.Array.from(a);Ext.Array.each(a,function(e){var d=e.ref,c="get"+Ext.String.capitalize(d);if(!b[c]){b[c]=Ext.Function.pass(b.getRef,[d,e],b)}b.references=b.references||[];b.references.push(d.toLowerCase())})},addRef:function(a){return this.ref([a])},getRef:function(e,g,b){this.refCache=this.refCache||{};g=g||{};b=b||{};Ext.apply(g,b);if(g.forceCreate){return Ext.ComponentManager.create(g,"component")}var d=this,a=g.selector,c=d.refCache[e];if(!c){d.refCache[e]=c=Ext.ComponentQuery.query(g.selector)[0];if(!c&&g.autoCreate){d.refCache[e]=c=Ext.ComponentManager.create(g,"component")}if(c){c.on("beforedestroy",function(){d.refCache[e]=null})}}return c},hasRef:function(a){return this.references&&this.references.indexOf(a.toLowerCase())!==-1},control:function(a,b){this.application.control(a,b,this)},getController:function(a){return this.application.getController(a)},getStore:function(a){return this.application.getStore(a)},getModel:function(a){return this.application.getModel(a)},getView:function(a){return this.application.getView(a)}});Ext.define("Ext.chart.Label",{requires:["Ext.draw.Color"],colorStringRe:/url\s*\(\s*#([^\/)]+)\s*\)/,constructor:function(a){var b=this;b.label=Ext.applyIf(b.label||{},{display:"none",color:"#000",field:"name",minMargin:50,font:"11px Helvetica, sans-serif",orientation:"horizontal",renderer:function(c){return c}});if(b.label.display!=="none"){b.labelsGroup=b.chart.surface.getGroup(b.seriesId+"-labels")}},renderLabels:function(){var o=this,L=o.chart,x=L.gradients,r=o.items,H=L.animate,A=o.label,u=A.display,v=A.color,d=[].concat(A.field),q=o.labelsGroup,l=(q||0)&&q.length,b=o.chart.getChartStore(),p=b.getCount(),h=(r||0)&&r.length,D=h/p,z=(x||0)&&x.length,m=Ext.draw.Color,K=[],n,J,E,c,y,I,G,e,g,t,w,F,M,s,N,C,B,a;if(u=="none"){return}if(h==0){while(l--){K.push(l)}}else{for(J=0,E=0,c=0;J<p;J++){y=0;for(I=0;I<D;I++){w=r[E];F=q.getAt(c);M=b.getAt(J);while(this.__excludes&&this.__excludes[y]&&D>1){if(d[I]){K.push(c)}y++}if(!w&&F){F.hide(true);c++}if(w&&d[I]){if(!F){F=o.onCreateLabel(M,w,J,u,I,y)}o.onPlaceLabel(F,M,w,J,u,H,I,y);c++;if(A.contrast&&w.sprite){s=w.sprite;if(s._endStyle){a=s._endStyle.fill}else{if(s._to){a=s._to.fill}else{a=s.attr.fill}}a=a||s.attr.fill;N=m.fromString(a);if(a&&!N){a=a.match(o.colorStringRe)[1];for(G=0;G<z;G++){n=x[G];if(n.id==a){t=0;e=0;for(g in n.stops){t++;e+=m.fromString(n.stops[g].color).getGrayscale()}C=(e/t)/255;break}}}else{C=N.getGrayscale()/255}if(F.isOutside){C=1}B=m.fromString(F.attr.color||F.attr.fill).getHSL();B[2]=C>0.5?0.2:0.8;F.setAttributes({fill:String(m.fromHSL.apply({},B))},true)}}E++;y++}}l=q.length;while(l>c){K.push(c);c++}}o.hideLabels(K)},hideLabels:function(b){var a=this.labelsGroup,c=!!b&&b.length;if(!a){return}if(c===false){c=a.getCount();while(c--){a.getAt(c).hide(true)}}else{while(c--){a.getAt(b[c]).hide(true)}}}});Ext.define("Ext.chart.theme.Theme",{requires:["Ext.draw.Color"],theme:"Base",themeAttrs:false,initTheme:function(e){var d=this,b=Ext.chart.theme,c,a;if(e){e=e.split(":");for(c in b){if(c==e[0]){a=e[1]=="gradients";d.themeAttrs=new b[c]({useGradients:a});if(a){d.gradients=d.themeAttrs.gradients}if(d.themeAttrs.background){d.background=d.themeAttrs.background}return}}}}},function(){(function(){Ext.chart.theme=function(c,b){c=c||{};var m=0,p=+new Date(),j,a,k,r,s,g,o,q,n=[],e,h;if(c.baseColor){e=Ext.draw.Color.fromString(c.baseColor);h=e.getHSL()[2];if(h<0.15){e=e.getLighter(0.3)}else{if(h<0.3){e=e.getLighter(0.15)}else{if(h>0.85){e=e.getDarker(0.3)}else{if(h>0.7){e=e.getDarker(0.15)}}}}c.colors=[e.getDarker(0.3).toString(),e.getDarker(0.15).toString(),e.toString(),e.getLighter(0.15).toString(),e.getLighter(0.3).toString()];delete c.baseColor}if(c.colors){a=c.colors.slice();s=b.markerThemes;r=b.seriesThemes;j=a.length;b.colors=a;for(;m<j;m++){k=a[m];o=s[m]||{};g=r[m]||{};o.fill=g.fill=o.stroke=g.stroke=k;s[m]=o;r[m]=g}b.markerThemes=s.slice(0,j);b.seriesThemes=r.slice(0,j)}for(q in b){if(q in c){if(Ext.isObject(c[q])&&Ext.isObject(b[q])){Ext.apply(b[q],c[q])}else{b[q]=c[q]}}}if(c.useGradients){a=b.colors||(function(){var d=[];for(m=0,r=b.seriesThemes,j=r.length;m<j;m++){d.push(r[m].fill||r[m].stroke)}return d})();for(m=0,j=a.length;m<j;m++){e=Ext.draw.Color.fromString(a[m]);if(e){k=e.getDarker(0.1).toString();e=e.toString();q="theme-"+e.substr(1)+"-"+k.substr(1)+"-"+p;n.push({id:q,angle:45,stops:{0:{color:e.toString()},100:{color:k.toString()}}});a[m]="url(#"+q+")"}}b.gradients=n;b.colors=a}Ext.apply(this,b)}})()});Ext.define("Ext.chart.theme.Base",{requires:["Ext.chart.theme.Theme"],constructor:function(a){Ext.chart.theme.call(this,a,{background:false,axis:{stroke:"#444","stroke-width":1},axisLabelTop:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelRight:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelBottom:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisLabelLeft:{fill:"#444",font:"12px Arial, Helvetica, sans-serif",spacing:2,padding:5,renderer:function(b){return b}},axisTitleTop:{font:"bold 18px Arial",fill:"#444"},axisTitleRight:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},axisTitleBottom:{font:"bold 18px Arial",fill:"#444"},axisTitleLeft:{font:"bold 18px Arial",fill:"#444",rotate:{x:0,y:0,degrees:270}},series:{"stroke-width":0},seriesLabel:{font:"12px Arial",fill:"#333"},marker:{stroke:"#555",radius:3,size:3},colors:["#94ae0a","#115fa6","#a61120","#ff8809","#ffd13e","#a61187","#24ad9a","#7c7474","#a66111"],seriesThemes:[{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#115fa6"},{fill:"#94ae0a"},{fill:"#a61120"},{fill:"#ff8809"},{fill:"#ffd13e"},{fill:"#a61187"},{fill:"#24ad9a"},{fill:"#7c7474"},{fill:"#a66111"}],markerThemes:[{fill:"#115fa6",type:"circle"},{fill:"#94ae0a",type:"cross"},{fill:"#115fa6",type:"plus"},{fill:"#94ae0a",type:"circle"},{fill:"#a61120",type:"cross"}]})}},function(){var c=["#b1da5a","#4ce0e7","#e84b67","#da5abd","#4d7fe6","#fec935"],k=["Green","Sky","Red","Purple","Blue","Yellow"],h=0,g=0,b=c.length,a=Ext.chart.theme,d=[["#f0a50a","#c20024","#2044ba","#810065","#7eae29"],["#6d9824","#87146e","#2a9196","#d39006","#1e40ac"],["#fbbc29","#ce2e4e","#7e0062","#158b90","#57880e"],["#ef5773","#fcbd2a","#4f770d","#1d3eaa","#9b001f"],["#7eae29","#fdbe2a","#910019","#27b4bc","#d74dbc"],["#44dce1","#0b2592","#996e05","#7fb325","#b821a1"]],e=d.length;for(;h<b;h++){a[k[h]]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({baseColor:i},j))}})})(c[h])}for(h=0;h<e;h++){a["Category"+(h+1)]=(function(i){return Ext.extend(a.Base,{constructor:function(j){a.Base.prototype.constructor.call(this,Ext.apply({colors:i},j))}})})(d[h])}});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.util.Observable"},autoStart:false,pauseOnException:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b,a);b.operations=[];b.exceptions=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a);return this},start:function(a){var b=this;if(b.isRunning){return b}b.exceptions.length=0;b.hasException=false;b.isRunning=true;return b.runOperation(Ext.isDefined(a)?a:b.current+1)},retry:function(){return this.start(this.current)},runNextOperation:function(){return this.runOperation(this.current+1)},pause:function(){this.isRunning=false;return this},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(g){var h=g.hasException();if(h){e.hasException=true;e.exceptions.push(g);e.fireEvent("exception",e,g)}if(h&&e.pauseOnException){e.pause()}else{g.setCompleted();e.fireEvent("operationcomplete",e,g);e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}return e}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},url:null,async:true,method:null,username:"",password:"",disableCaching:true,withCredentials:false,cors:false,disableCachingParam:"_dc",timeout:30000,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",constructor:function(a){a=a||{};Ext.apply(this,a);this.requests={};this.mixins.observable.constructor.call(this)},request:function(k){k=k||{};var g=this,j=k.scope||window,e=k.username||g.username,h=k.password||g.password||"",b,c,d,a,i;if(g.fireEvent("beforerequest",g,k)!==false){c=g.setOptions(k,j);if(g.isFormUpload(k)){g.upload(k.form,c.url,c.data,k);return null}if(k.autoAbort||g.autoAbort){g.abort()}b=k.async!==false?(k.async||g.async):false;i=g.openRequest(k,c,b,e,h);a=g.setupHeaders(i,k,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:i,headers:a,options:k,async:b,timeout:setTimeout(function(){d.timedout=true;g.abort(d)},k.timeout||g.timeout)};g.requests[d.id]=d;g.latestId=d.id;if(b){i.onreadystatechange=Ext.Function.bind(g.onStateChange,g,[d])}i.send(c.data);if(!b){return g.onComplete(d)}return d}else{Ext.callback(k.callback,k.scope,[k,undefined,undefined]);return null}},upload:function(e,c,j,l){e=Ext.getDom(e);l=l||{};var d=Ext.id(),h=document.createElement("iframe"),k=[],i="multipart/form-data",g={target:e.target,method:e.method,encoding:e.encoding,enctype:e.enctype,action:e.action},b=function(m,n){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:n,name:m});e.appendChild(a);k.push(a)},a;Ext.fly(h).set({id:d,name:d,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(h);if(document.frames){document.frames[d].name=d}Ext.fly(e).set({target:d,method:"POST",enctype:i,encoding:i,action:c||g.action});if(j){Ext.iterate(Ext.Object.fromQueryString(j),function(m,n){if(Ext.isArray(n)){Ext.each(n,function(o){b(m,o)})}else{b(m,n)}})}Ext.fly(h).on("load",Ext.Function.bind(this.onUploadComplete,this,[h,l]),null,{single:true});e.submit();Ext.fly(e).set(g);Ext.each(k,function(m){Ext.removeNode(m)})},onUploadComplete:function(i,b){var c=this,a={responseText:"",responseXML:null},h,g;try{h=i.contentWindow.document||i.contentDocument||window.frames[i.id].document;if(h){if(h.body){if(/textarea/i.test((g=h.body.firstChild||{}).tagName)){a.responseText=g.value}else{a.responseText=h.body.innerHTML}}a.responseXML=h.XMLDocument||h}}catch(d){}c.fireEvent("requestcomplete",c,a,b);Ext.callback(b.success,b.scope,[a,b]);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(i)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(l,k){var i=this,e=l.params||{},h=i.extraParams,d=l.urlParams,c=l.url||i.url,j=l.jsonData,b,a,g;if(Ext.isFunction(e)){e=e.call(k,l)}if(Ext.isFunction(c)){c=c.call(k,l)}c=this.setupUrl(l,c);g=l.rawData||l.xmlData||j||null;if(j&&!Ext.isPrimitive(j)){g=Ext.encode(g)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(h)){h=Ext.Object.toQueryString(h)}e=e+((h)?((e)?"&":"")+h:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(l,e);b=(l.method||i.method||((e||g)?"POST":"GET")).toUpperCase();this.setupMethod(l,b);a=l.disableCaching!==false?(l.disableCaching||i.disableCaching):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(l.disableCachingParam||i.disableCachingParam)+"="+(new Date().getTime()))}if((b=="GET"||g)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:g||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(m,n,d,c){var i=this,b=Ext.apply({},n.headers||{},i.defaultHeaders||{}),l=i.defaultPostHeader,j=n.jsonData,a=n.xmlData,k,g;if(!b["Content-Type"]&&(d||c)){if(d){if(n.rawData){l="text/plain"}else{if(a&&Ext.isDefined(a)){l="text/xml"}else{if(j&&Ext.isDefined(j)){l="application/json"}}}}b["Content-Type"]=l}if(i.useDefaultXhrHeader&&!b["X-Requested-With"]){b["X-Requested-With"]=i.defaultXhrHeader}try{for(k in b){if(b.hasOwnProperty(k)){g=b[k];m.setRequestHeader(k,g)}}}catch(h){i.fireEvent("exception",k,g)}return b},newRequest:function(a){var b;if((a.cors||this.cors)&&Ext.isIE&&Ext.ieVersion>=8){b=new XDomainRequest()}else{b=this.getXhrInstance()}return b},openRequest:function(c,a,d,g,b){var e=this.newRequest(c);if(g){e.open(a.method,a.url,d,g,b)}else{e.open(a.method,a.url,d)}if(c.withCredentials||this.withCredentials){e.withCredentials=true}return e},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,g;for(;c<a;++c){try{g=b[c];g();break}catch(d){}}return g})(),isLoading:function(a){if(!a){a=this.getLatest()}if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this,d;if(!b){b=a.getLatest()}if(b&&a.isLoading(b)){d=b.xhr;try{d.onreadystatechange=null}catch(c){d=Ext.emptyFn}d.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}},abortAll:function(){var b=this.requests,a;for(a in b){if(b.hasOwnProperty(a)){this.abort(b[a])}}},getLatest:function(){var b=this.latestId,a;if(b){a=this.requests[b]}return a||null},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(g){var d=this,c=g.options,a,i,b;try{a=d.parseStatus(g.xhr.status)}catch(h){a={success:false,isException:false}}i=a.success;if(i){b=d.createResponse(g);d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||g.aborted||g.timedout){b=d.createException(g)}else{b=d.createResponse(g)}d.fireEvent("requestexception",d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,i,b]);delete d.requests[g.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var i=c.xhr,a={},j=i.getAllResponseHeaders().replace(/\r\n/g,"\n").split("\n"),d=j.length,k,e,h,g,b;while(d--){k=j[d];e=k.indexOf(":");if(e>=0){h=k.substr(0,e).toLowerCase();if(k.charAt(e+1)==" "){++e}a[h]=k.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:i.status,statusText:i.statusText,getResponseHeader:function(l){return a[l.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:i.responseText,responseXML:i.responseXML};i=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",constructor:function(b){if(Ext.isString(b)){b={name:b}}Ext.apply(this,b);var d=Ext.data.Types,a=this.sortType,c;if(this.type){if(Ext.isString(this.type)){this.type=d[this.type.toUpperCase()]||d.AUTO}}else{this.type=d.AUTO}if(Ext.isString(a)){this.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,useNull:false,defaultValue:"",mapping:null,sortType:null,sortDir:"ASC",allowBlank:true,persist:true});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field"],statics:{decorate:function(b){var a,c;if(typeof b=="string"){b=Ext.ModelManager.getModel(b)}if(b.prototype.isNode){return}a=b.prototype.idProperty;c=b.prototype.fields.get(a).type.type;b.override(this.getPrototypeBody());this.applyFields(b,[{name:"parentId",type:c,defaultValue:null},{name:"index",type:"int",defaultValue:null,persist:false},{name:"depth",type:"int",defaultValue:0,persist:false},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null,persist:false},{name:"leaf",type:"bool",defaultValue:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"icon",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false},{name:"children",type:"auto",defaultValue:null,persist:false}])},applyFields:function(c,b){var h=c.prototype,a=h.fields,g=a.keys,e=b.length,j,d;for(d=0;d<e;d++){j=b[d];if(!Ext.Array.contains(g,j.name)){a.add(new Ext.data.Field(j))}}},getPrototypeBody:function(){return{isNode:true,constructor:function(){var a=this;this.callParent(arguments);Ext.applyIf(a,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});a.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort"]);return a},createNode:function(a){if(Ext.isObject(a)&&!a.isModel){a=Ext.ModelManager.create(a,this.modelName)}return a},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},updateInfo:function(g){var m=this,b=m.isRoot(),k=m.parentNode,d=(!k||b?true:k.firstChild===m),j=(!k||b?true:k.lastChild===m),h=0,n=m,a=m.childNodes,l=a.length,e=0,c=m.phantom;while(n.parentNode){++h;n=n.parentNode}m.beginEdit();m.set({isFirst:d,isLast:j,depth:h,index:k?k.indexOf(m):0,parentId:k?k.getId():null});m.endEdit(true);if(g){m.commit();m.phantom=c}for(e=0;e<l;e++){a[e].updateInfo(g)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,k,c){var h=this,d,g,e,j,a;if(Ext.isArray(b)){h.callStore("suspendAutoSync");for(d=0,g=b.length-1;d<g;d++){h.appendChild(b[d])}h.callStore("resumeAutoSync");h.appendChild(b[g])}else{b=h.createNode(b);if(k!==true&&h.fireEvent("beforeappend",h,b)===false){return false}e=h.childNodes.length;j=b.parentNode;if(j){if(k!==true&&b.fireEvent("beforemove",b,j,h,e)===false){return false}j.removeChild(b,false,false,true)}e=h.childNodes.length;if(e===0){h.setFirstChild(b)}h.childNodes.push(b);b.parentNode=h;b.nextSibling=null;h.setLastChild(b);a=h.childNodes[e-1];if(a){b.previousSibling=a;a.nextSibling=b;a.updateInfo(c)}else{b.previousSibling=null}b.updateInfo(c);if(!h.isLoaded()){h.set("loaded",true)}else{if(h.childNodes.length===1){h.set("loaded",h.isLoaded())}}if(!b.isLeaf()&&b.phantom){b.set("loaded",true)}if(k!==true){h.fireEvent("append",h,b,e);if(j){b.fireEvent("move",b,j,h,e)}}return b}},getBubbleTarget:function(){return this.parentNode},removeChild:function(j,e,g,b){var h=this,c=h.indexOf(j),d,a;if(c==-1||(g!==true&&h.fireEvent("beforeremove",h,j,!!b)===false)){return false}Ext.Array.erase(h.childNodes,c,1);if(h.firstChild==j){h.setFirstChild(j.nextSibling)}if(h.lastChild==j){h.setLastChild(j.previousSibling)}if(j.previousSibling){j.previousSibling.nextSibling=j.nextSibling}if(j.nextSibling){j.nextSibling.previousSibling=j.previousSibling}for(d=c>0?c-1:0,a=h.childNodes.length;d<a;d++){h.childNodes[d].updateInfo()}if(!h.childNodes.length){h.set("loaded",h.isLoaded())}if(g!==true){h.fireEvent("remove",h,j,!!b)}if(e){j.destroy(true)}else{j.clear()}return j},copy:function(d,c){var g=this,b=g.callOverridden(arguments),a=g.childNodes?g.childNodes.length:0,e;if(c){for(e=0;e<a;e++){b.appendChild(g.childNodes[e].copy(true))}}return b},clear:function(a){var b=this;b.parentNode=b.previousSibling=b.nextSibling=null;if(a){b.firstChild=b.lastChild=null}},destroy:function(a){var c=this,b=c.destroyOptions;if(a===true){c.clear(true);Ext.each(c.childNodes,function(d){d.destroy(true)});c.childNodes=null;delete c.destroyOptions;c.callOverridden([b])}else{c.destroyOptions=a;c.remove(true)}},insertBefore:function(b,g,l){var h=this,e=h.indexOf(g),j=b.parentNode,k=e,c,a,d;if(!g){return h.appendChild(b)}if(b==g){return false}b=h.createNode(b);if(l!==true&&h.fireEvent("beforeinsert",h,b,g)===false){return false}if(j==h&&h.indexOf(b)<e){k--}if(j){if(l!==true&&b.fireEvent("beforemove",b,j,h,e,g)===false){return false}j.removeChild(b,false,false,true)}if(k===0){h.setFirstChild(b)}Ext.Array.splice(h.childNodes,k,0,b);b.parentNode=h;b.nextSibling=g;g.previousSibling=b;a=h.childNodes[k-1];if(a){b.previousSibling=a;a.nextSibling=b}else{b.previousSibling=null}for(d=k>0?k-1:0,c=h.childNodes.length;d<c;d++){h.childNodes[d].updateInfo()}if(!h.isLoaded()){h.set("loaded",true)}else{if(h.childNodes.length===1){h.set("loaded",h.isLoaded())}}if(!b.isLeaf()&&b.phantom){b.set("loaded",true)}if(l!==true){h.fireEvent("insert",h,b,g);if(j){b.fireEvent("move",b,j,h,k,g)}}return b},insertChild:function(a,c){var b=this.childNodes[a];if(b){return this.insertBefore(c,b)}else{return this.appendChild(c)}},remove:function(b,c){var a=this.parentNode;if(a){a.removeChild(this,b,c)}return this},removeAll:function(a,b){var d=this.childNodes,c;while((c=d[0])){this.removeChild(c,a,b)}return this},getChildAt:function(a){return this.childNodes[a]},replaceChild:function(a,d,c){var b=d?d.nextSibling:null;this.removeChild(d,false,c);this.insertBefore(a,b,c);return d},indexOf:function(a){return Ext.Array.indexOf(this.childNodes,a)},getPath:function(d,c){d=d||this.idProperty;c=c||"/";var b=[this.get(d)],a=this.parentNode;while(a){b.unshift(a.get(d));a=a.parentNode}return c+b.join(c)},getDepth:function(){return this.get("depth")},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascade:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.Node: cascade has been deprecated. Please use cascadeBy instead.")}return this.cascadeBy.apply(this,arguments)},cascadeBy:function(d,c,a){if(d.apply(c||this,a||[this])!==false){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){g[b].cascadeBy(d,c,a)}}},eachChild:function(d,c,a){var g=this.childNodes,e=g.length,b;for(b=0;b<e;b++){if(d.apply(c||this,a||[g[b]])===false){break}}},findChild:function(b,c,a){return this.findChildBy(function(){return this.get(b)==c},null,a)},findChildBy:function(h,g,b){var e=this.childNodes,a=e.length,d=0,j,c;for(;d<a;d++){j=e[d];if(h.call(g||j,j)===true){return j}else{if(b){c=j.findChildBy(h,g,b);if(c!==null){return c}}}}return null},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},sort:function(g,b,a){var d=this.childNodes,e=d.length,c,h;if(e>0){Ext.Array.sort(d,g);for(c=0;c<e;c++){h=d[c];h.previousSibling=d[c-1];h.nextSibling=d[c+1];if(c===0){this.setFirstChild(h)}if(c==e-1){this.setLastChild(h)}h.updateInfo();if(b&&!h.isLeaf()){h.sort(g,true,true)}}if(a!==true){this.fireEvent("sort",this,d)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var a=this.parentNode;while(a){if(!a.isExpanded()){return false}a=a.parentNode}return true},expand:function(a,d,b){var c=this;if(!c.isLeaf()){if(c.isLoading()){c.on("expand",function(){c.expand(a,d,b)},c,{single:true})}else{if(!c.isExpanded()){c.fireEvent("beforeexpand",c,function(){c.set("expanded",true);c.fireEvent("expand",c,c.childNodes,false);if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.expandChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}}}}else{Ext.callback(d,b||c)}},expandChildren:function(d,j,k){var h=this,e=0,a=h.childNodes,g=a.length,c,b=0;for(;e<g;++e){c=a[e];if(!c.isLeaf()&&!c.isExpanded()){b++;a[e].expand(d,function(){b--;if(j&&!b){Ext.callback(j,k||h,[h.childNodes])}})}}if(!b&&j){Ext.callback(j,k||h,[h.childNodes])}},collapse:function(a,d,b){var c=this;if(!c.isLeaf()){if(!c.collapsing&&c.isExpanded()){c.fireEvent("beforecollapse",c,function(){c.set("expanded",false);c.fireEvent("collapse",c,c.childNodes,false);if(a){c.collapseChildren(true,d,b)}else{Ext.callback(d,b||c,[c.childNodes])}},c)}else{if(a){c.collapseChildren(true,d,b)}}}else{Ext.callback(d,b||c,[c.childNodes])}},collapseChildren:function(d,j,k){var h=this,e=0,b=h.childNodes,g=b.length,c,a=0;for(;e<g;++e){c=b[e];if(!c.isLeaf()&&c.isExpanded()){a++;b[e].collapse(d,function(){a--;if(j&&!a){Ext.callback(j,k||h,[h.childNodes])}})}}if(!a&&j){Ext.callback(j,k||h,[h.childNodes])}}}}}});Ext.define("Ext.data.Tree",{alias:"data.tree",mixins:{observable:"Ext.util.Observable"},root:null,constructor:function(a){var b=this;b.mixins.observable.constructor.call(b);if(a){b.setRootNode(a)}},getRootNode:function(){return this.root},setRootNode:function(b){var a=this;a.root=b;if(a.fireEvent("beforeappend",null,b)!==false){b.set("root",true);b.updateInfo();b.commit();b.on({scope:a,insert:a.onNodeInsert,append:a.onNodeAppend,remove:a.onNodeRemove});a.relayEvents(b,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);a.nodeHash={};a.registerNode(b);a.fireEvent("append",null,b);a.fireEvent("rootchange",b)}return b},flatten:function(){var a=[],c=this.nodeHash,b;for(b in c){if(c.hasOwnProperty(b)){a.push(c[b])}}return a},onNodeInsert:function(a,b){this.registerNode(b,true)},onNodeAppend:function(a,b){this.registerNode(b,true)},onNodeRemove:function(a,b){this.unregisterNode(b,true)},onNodeIdChanged:function(c,d,a){var b=this.nodeHash;b[a]=c;delete b[d||c.internalId]},getNodeById:function(a){return this.nodeHash[a]},registerNode:function(c,a){var b=this;b.nodeHash[c.getId()||c.internalId]=c;c.on("idchanged",b.onNodeIdChanged,b);if(a===true){c.eachChild(function(d){b.registerNode(d,true)})}},unregisterNode:function(b,a){delete this.nodeHash[b.getId()||b.internalId];if(a===true){b.eachChild(function(c){this.unregisterNode(c,true)},this)}},sort:function(b,a){this.getRootNode().sort(b,a)},filter:function(b,a){this.getRootNode().filter(b,a)}});Ext.define("Ext.data.association.HasMany",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasManyAssociation",requires:["Ext.util.Inflector"],alias:"association.hasmany",constructor:function(c){var d=this,a,b;d.callParent(arguments);d.name=d.name||Ext.util.Inflector.pluralize(d.associatedName.toLowerCase());a=d.ownerModel.prototype;b=d.name;Ext.applyIf(d,{storeName:b+"Store",foreignKey:d.ownerName.toLowerCase()+"_id"});a[b]=d.createStore()},createStore:function(){var h=this,i=h.associatedModel,c=h.storeName,d=h.foreignKey,a=h.primaryKey,g=h.filterProperty,b=h.autoLoad,e=h.storeConfig||{};return function(){var m=this,k,l,j={};if(m[c]===undefined){if(g){l={property:g,value:m.get(g),exactMatch:true}}else{l={property:d,value:m.get(a),exactMatch:true}}j[d]=m.get(a);k=Ext.apply({},e,{model:i,filters:[l],remoteFilter:false,modelDefaults:j});m[c]=new Ext.data.Store(k);if(b){m[c].load()}}return m[c]}},read:function(c,a,e){var d=c[this.name](),b;d.add(a.read(e).records);b=this.associatedModel.prototype.associations.findBy(function(g){return g.type==="belongsTo"&&g.associatedName===c.$className});if(b){d.data.each(function(g){g[b.instanceName]=c})}}});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",root:"",useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){var c;try{c=Ext.decode(a.responseText)}catch(b){Ext.Error.raise({response:a,json:a.responseText,parseError:b,msg:"Unable to parse the JSON returned by the server: "+b.toString()})}return c},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","return obj"+(b>0?".":"")+c)}}return function(d){return d[c]}}}()});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",totalProperty:undefined,successProperty:undefined,buildExtractors:function(){this.callParent(arguments);var a=this.model.prototype.fields.items,b=0,c=a.length,e=[],d;for(;b<c;b++){d=a[b].mapping;e.push(function(g){return function(h){return h[g]}}(d!==null?d:b))}this.extractorFunctions=e}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&&c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define("Ext.data.proxy.Proxy",{alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],mixins:{observable:"Ext.util.Observable"},batchOrder:"create,update,destroy",batchActions:true,defaultReaderType:"json",defaultWriterType:"json",isProxy:true,constructor:function(a){a=a||{};if(a.model===undefined){delete a.model}Ext.apply(this,a);this.mixins.observable.constructor.call(this);if(this.model!==undefined&&!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(b,c){this.model=Ext.ModelManager.getModel(b);var a=this.reader,d=this.writer;this.setReader(a);this.setWriter(d);if(c&&this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(a){var b=this;if(a===undefined||typeof a=="string"){a={type:a}}if(a.isReader){a.setModel(b.model)}else{Ext.applyIf(a,{proxy:b,model:b.model,type:b.defaultReaderType});a=Ext.createByAlias("reader."+a.type,a)}if(a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}b.reader=a;return b.reader},getReader:function(){return this.reader},onMetaChange:function(a){this.fireEvent("metachange",this,a)},setWriter:function(a){if(a===undefined||typeof a=="string"){a={type:a}}if(!(a instanceof Ext.data.writer.Writer)){Ext.applyIf(a,{model:this.model,type:this.defaultWriterType});a=Ext.createByAlias("writer."+a.type,a)}this.writer=a;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(d,e){var g=this,c=g.batchActions,b,a;if(d.operations===undefined){d={operations:d,listeners:e}}if(d.batch){if(Ext.isDefined(d.batch.runOperation)){b=Ext.applyIf(d.batch,{proxy:g,listeners:{}})}}else{d.batch={proxy:g,listeners:d.listeners||{}}}if(!b){b=new Ext.data.Batch(d.batch)}b.on("complete",Ext.bind(g.onBatchComplete,g,[d],0));Ext.each(g.batchOrder.split(","),function(h){a=d.operations[h];if(a){if(c){b.add(new Ext.data.Operation({action:h,records:a}))}else{Ext.each(a,function(i){b.add(new Ext.data.Operation({action:h,records:[i]}))})}}},g);b.start();return b},onBatchComplete:function(a,b){var c=a.scope||this;if(b.hasException){if(Ext.isFunction(a.failure)){Ext.callback(a.failure,c,[b,a])}}else{if(Ext.isFunction(a.success)){Ext.callback(a.success,c,[b,a])}}if(Ext.isFunction(a.callback)){Ext.callback(a.callback,c,[b,a])}}},function(){Ext.data.DataProxy=this});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.data.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",constructor:function(a){this.callParent([a]);this.setReader(this.reader)},updateOperation:function(b,g,d){var c=0,e=b.getRecords(),a=e.length;for(c;c<a;c++){e[c].commit()}b.setCompleted();b.setSuccessful();Ext.callback(g,d||this,[b])},create:function(){this.updateOperation.apply(this,arguments)},update:function(){this.updateOperation.apply(this,arguments)},destroy:function(){this.updateOperation.apply(this,arguments)},read:function(c,g,d){var e=this,b=e.getReader(),a=b.read(e.data);Ext.apply(c,{resultSet:a});c.setCompleted();c.setSuccessful();Ext.callback(g,d||e,[c])},clear:Ext.emptyFn});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",uses:["Ext.data.Request"],pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,constructor:function(a){var b=this;a=a||{};b.callParent([a]);b.extraParams=a.extraParams||{};b.api=Ext.apply({},a.api||b.api);b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(a,b){this.extraParams[a]=b},buildRequest:function(a){var c=this,d=Ext.applyIf(a.params||{},c.extraParams||{}),b;d=Ext.applyIf(d,c.getParams(a));if(a.id&&!d.id){d.id=a.id}b=new Ext.data.Request({params:d,action:a.action,records:a.records,operation:a,url:a.url,proxy:c});b.url=c.buildUrl(b);a.request=b;return b},processResponse:function(h,a,c,b,g,i){var e=this,d,j;if(h===true){d=e.getReader();j=d.read(e.extractResponseData(b));if(j.success!==false){Ext.apply(a,{response:b,resultSet:j});a.commitRecords(j.records);a.setCompleted();a.setSuccessful()}else{a.setException(j.message);e.fireEvent("exception",this,b,a)}}else{e.setException(a,b);e.fireEvent("exception",this,b,a)}if(typeof g=="function"){g.call(i||e,a)}e.afterRequest(c,h)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(l){var s=this,r={},o=Ext.isDefined,p=l.groupers,a=l.sorters,j=l.filters,h=l.page,g=l.start,q=l.limit,i=s.simpleSortMode,n=s.pageParam,d=s.startParam,b=s.limitParam,c=s.groupParam,e=s.sortParam,m=s.filterParam,k=s.directionParam;if(n&&o(h)){r[n]=h}if(d&&o(g)){r[d]=g}if(b&&o(q)){r[b]=q}if(c&&p&&p.length>0){r[c]=s.encodeSorters(p)}if(e&&a&&a.length>0){if(i){r[e]=a[0].property;r[k]=a[0].direction}else{r[e]=s.encodeSorters(a)}}if(m&&j&&j.length>0){r[m]=s.encodeFilters(j)}return r},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true,constructor:function(){this.addEvents("exception");this.callParent(arguments)},doRequest:function(a,h,b){var d=this,e=d.getWriter(),c=d.buildRequest(a),g=c.params;if(a.allowWrite()){c=e.write(c)}Ext.apply(c,{callbackKey:d.callbackKey,timeout:d.timeout,scope:d,disableCaching:false,callback:d.createRequestCallback(c,a,h,b)});if(d.autoAppendParams){c.params={}}c.jsonp=Ext.data.JsonP.request(c);c.params=g;a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(i,g,h){delete c.lastRequest;c.processResponse(i,a,d,g,e,b)}},setException:function(b,a){b.setException(b.request.jsonp.errorType)},buildUrl:function(h){var g=this,b=g.callParent(arguments),j=Ext.apply({},h.params),e=j.filters,a,d,c;delete j.filters;if(g.autoAppendParams){b=Ext.urlAppend(b,Ext.Object.toQueryString(j))}if(e&&e.length){for(c=0;c<e.length;c++){d=e[c];if(d.value){b=Ext.urlAppend(b,d.property+"="+d.value)}}}a=h.records;if(Ext.isArray(a)&&a.length>0){b=Ext.urlAppend(b,Ext.String.format("{0}={1}",g.recordParam,g.encodeRecords(a)))}return b},destroy:function(){this.abort();this.callParent(arguments)},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.jsonp)}},encodeRecords:function(b){var d="",c=0,a=b.length;for(;c<a;c++){d+=Ext.Object.toQueryString(b[c].getData())}return d}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",requires:["Ext.data.SequentialIdGenerator"],id:undefined,constructor:function(a){this.callParent(arguments);this.cache={};this.id=this.id||(this.store?this.store.storeId:undefined);this.initialize()},create:function(e,k,l){var j=this,d=e.records,c=d.length,a=j.getIds(),b,h,g;e.setStarted();if(j.isHierarchical===undefined){j.isHierarchical=!!d[0].isNode;if(j.isHierarchical){j.getStorageObject().setItem(j.getTreeKey(),true)}}for(g=0;g<c;g++){h=d[g];if(h.phantom){h.phantom=false;b=j.getNextId()}else{b=h.getId()}j.setRecord(h,b);h.commit();a.push(b)}j.setIds(a);e.setCompleted();e.setSuccessful();if(typeof k=="function"){k.call(l||j,e)}},read:function(g,m,o){var l=this,e=[],j=0,n=true,d=l.model,a,c,k,h,b;g.setStarted();if(l.isHierarchical){e=l.getTreeData()}else{a=l.getIds();c=a.length;b=g.id;if(b){h=l.getRecord(b);k=new d(h,b,h);if(k){e.push(k)}else{n=false}}else{for(;j<c;j++){b=a[j];h=l.getRecord(b);e.push(new d(h,b,h))}}}if(n){g.setSuccessful()}g.setCompleted();g.resultSet=Ext.create("Ext.data.ResultSet",{records:e,total:e.length,loaded:true});if(typeof m=="function"){m.call(o||l,g)}},update:function(e,j,k){var d=e.records,c=d.length,a=this.getIds(),h,b,g;e.setStarted();for(g=0;g<c;g++){h=d[g];this.setRecord(h);h.commit();b=h.getId();if(b!==undefined&&Ext.Array.indexOf(a,b)==-1){a.push(b)}}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof j=="function"){j.call(k||this,e)}},destroy:function(d,k,l){var g=this,c=d.records,a=g.getIds(),h=a.length,m=[],j={},e=c.length,b;d.setStarted();for(;e--;){Ext.apply(j,g.removeRecord(c[e]))}for(e=0;e<h;e++){b=a[e];if(!j[b]){m.push(b)}}g.setIds(m);d.setCompleted();d.setSuccessful();if(typeof k=="function"){k.call(l||g,d)}},getRecord:function(d){var b=this,a=b.cache,c=!a[d]?Ext.decode(b.getStorageObject().getItem(b.getRecordKey(d))):a[d];if(!c){return null}a[d]=c;c[b.model.prototype.idProperty]=d;return c},setRecord:function(k,c){if(c){k.setId(c)}else{c=k.getId()}var m=this,a=k.data,h={},j=m.model,l=j.prototype.fields.items,d=l.length,g=0,n,b,e,o;for(;g<d;g++){n=l[g];b=n.name;if(n.persist){h[b]=a[b]}}delete h[m.model.prototype.idProperty];if(k.isNode&&k.get("depth")===1){delete h.parentId}e=m.getStorageObject();o=m.getRecordKey(c);m.cache[c]=h;e.removeItem(o);e.setItem(o,Ext.encode(h))},removeRecord:function(a){var d=this,g=a.getId(),b={},c,e;b[g]=a;d.getStorageObject().removeItem(d.getRecordKey(g));delete d.cache[g];if(a.childNodes){e=a.childNodes;for(c=e.length;c--;){Ext.apply(b,d.removeRecord(e[c]))}}return b},getRecordKey:function(a){if(a.isModel){a=a.getId()}return Ext.String.format("{0}-{1}",this.id,a)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.id)},getTreeKey:function(){return Ext.String.format("{0}-tree",this.id)},getIds:function(){var g=this,d=(g.getStorageObject().getItem(g.id)||"").split(","),b=g.model,e=d.length,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",c;if(e==1&&d[0]===""){d=[]}else{for(c=0;c<e;c++){d[c]=a?d[c]:parseInt(d[c],10)}}return d},setIds:function(a){var b=this.getStorageObject(),c=a.join(",");b.removeItem(this.id);if(!Ext.isEmpty(c)){b.setItem(this.id,c)}},getNextId:function(){var d=this,e=d.getStorageObject(),c=d.getRecordCounterKey(),b=d.model,a=b.prototype.fields.get(b.prototype.idProperty).type.type==="string",g;g=d.idGenerator.generate();e.setItem(c,g);if(!a){g=parseInt(g)}return g},getTreeData:function(){var n=this,a=n.getIds(),e=a.length,j=[],b={},o=[],k=0,h=n.model,q=h.prototype.idProperty,g,m,p,l,d,c;for(;k<e;k++){c=a[k];m=n.getRecord(c);j.push(m);b[c]=m;if(!m.parentId){o.push(m)}}g=o.length;Ext.Array.sort(j,n.sortByParentId);for(k=g;k<e;k++){m=j[k];l=m.parentId;if(!p||p[q]!==l){p=b[l];p.children=d=[]}d.push(m)}for(k=e;k--;){m=j[k];if(!m.children&&!m.leaf){m.loaded=true}}for(k=g;k--;){m=o[k];o[k]=new h(m,m[q],m)}return o},sortByParentId:function(b,a){return(b.parentId||0)-(a.parentId||0)},initialize:function(){var b=this,a=b.getStorageObject(),c=parseInt(a.getItem(b.getRecordCounterKey()));a.setItem(b.id,a.getItem(b.id)||"");if(a.getItem(b.getTreeKey())){b.isHierarchical=true}b.idGenerator=new Ext.data.SequentialIdGenerator({seed:c?c+1:1})},clear:function(){var d=this,e=d.getStorageObject(),c=d.getIds(),a=c.length,b;for(b=0;b<a;b++){e.removeItem(d.getRecordKey(c[b]))}e.removeItem(d.getRecordCounterKey());e.removeItem(d.getTreeKey());e.removeItem(d.id);d.cache={}},getStorageObject:function(){}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Ext.data.proxy.SessionStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.sessionstorage",alternateClassName:"Ext.data.SessionStorageProxy",getStorageObject:function(){return window.sessionStorage}});Ext.define("Ext.direct.Provider",{alias:"direct.provider",mixins:{observable:"Ext.util.Observable"},constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("connect","disconnect","data","exception");b.mixins.observable.constructor.call(b,a)},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.define("Ext.direct.JsonProvider",{extend:"Ext.direct.Provider",alias:"direct.jsonprovider",uses:["Ext.direct.ExceptionEvent"],parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(Ext.isObject(a.responseText)){return a.responseText}return Ext.decode(a.responseText)}return null},createEvents:function(b){var h=null,d=[],g,c=0,a;try{h=this.parseResponse(b)}catch(j){g=new Ext.direct.ExceptionEvent({data:j,xhr:b,code:Ext.direct.Manager.self.exceptions.PARSE,message:"Error parsing json response: \n\n "+h});return[g]}if(Ext.isArray(h)){for(a=h.length;c<a;++c){d.push(this.createEvent(h[c]))}}else{d.push(this.createEvent(h))}return d},createEvent:function(a){return Ext.create("direct."+a.type,a)}});Ext.define("Ext.direct.PollingProvider",{extend:"Ext.direct.JsonProvider",alias:"direct.pollingprovider",uses:["Ext.direct.ExceptionEvent"],requires:["Ext.Ajax","Ext.util.DelayedTask"],interval:3000,constructor:function(a){this.callParent(arguments);this.addEvents("beforepoll","poll")},isConnected:function(){return !!this.pollTask},connect:function(){var b=this,a=b.url;if(a&&!b.pollTask){b.pollTask=Ext.TaskManager.start({run:function(){if(b.fireEvent("beforepoll",b)!==false){if(Ext.isFunction(a)){a(b.baseParams)}else{Ext.Ajax.request({url:a,callback:b.onData,scope:b,params:b.baseParams})}}},interval:b.interval,scope:b});b.fireEvent("connect",b)}else{if(!a){}}},disconnect:function(){var a=this;if(a.pollTask){Ext.TaskManager.stop(a.pollTask);delete a.pollTask;a.fireEvent("disconnect",a)}},onData:function(e,h,b){var g=this,d=0,a,c;if(h){c=g.createEvents(b);for(a=c.length;d<a;++d){g.fireEvent("data",g,c[d])}}else{g.fireEvent("data",g,new Ext.direct.ExceptionEvent({data:null,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:b}))}}});Ext.ns("Ext.fx");Ext.require("Ext.fx.CubicBezier",function(){var e=Math,h=e.PI,d=e.pow,b=e.sin,g=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(i){return i},ease:function(l){var i=0.07813-l/2,m=-0.25,o=g(0.0066+i*i),r=o-i,k=d(a(r),1/3)*(r<0?-1:1),p=-o-i,j=d(a(p),1/3)*(p<0?-1:1),s=k+j+0.25;return d(1-s,2)*3*s*0.1+(1-s)*3*s*s+s*s*s},easeIn:function(i){return d(i,1.7)},easeOut:function(i){return d(i,0.48)},easeInOut:function(r){var l=0.48-r/1.04,k=g(0.1734+l*l),i=k-l,p=d(a(i),1/3)*(i<0?-1:1),o=-k-l,m=d(a(o),1/3)*(o<0?-1:1),j=p+m+0.5;return(1-j)*3*j*j+j*j*j},backIn:function(i){return i*i*((c+1)*i-c)},backOut:function(i){i=i-1;return i*i*((c+1)*i+c)+1},elasticIn:function(k){if(k===0||k===1){return k}var j=0.3,i=j/4;return d(2,-10*k)*b((k-i)*(2*h)/j)+1},elasticOut:function(i){return 1-Ext.fx.Easing.elasticIn(1-i)},bounceIn:function(i){return 1-Ext.fx.Easing.bounceOut(1-i)},bounceOut:function(m){var j=7.5625,k=2.75,i;if(m<(1/k)){i=j*m*m}else{if(m<(2/k)){m-=(1.5/k);i=j*m*m+0.75}else{if(m<(2.5/k)){m-=(2.25/k);i=j*m*m+0.9375}else{m-=(2.625/k);i=j*m*m+0.984375}}}return i}});Ext.apply(Ext.fx.Easing,{"back-in":Ext.fx.Easing.backIn,"back-out":Ext.fx.Easing.backOut,"ease-in":Ext.fx.Easing.easeIn,"ease-out":Ext.fx.Easing.easeOut,"elastic-in":Ext.fx.Easing.elasticIn,"elastic-out":Ext.fx.Easing.elasticIn,"bounce-in":Ext.fx.Easing.bounceIn,"bounce-out":Ext.fx.Easing.bounceOut,"ease-in-out":Ext.fx.Easing.easeInOut})});Ext.define("Ext.fx.target.Component",{extend:"Ext.fx.target.Target",type:"component",getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle("opacity")}},compMethod:{top:"setPosition",left:"setPosition",x:"setPagePosition",y:"setPagePosition",height:"setSize",width:"setSize",opacity:"setOpacity"},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(t,e,b){var r=this,m=r.target,q=t.length,v,n,a,g,d,p,l,c,s,u,k;for(g=0;g<q;g++){v=t[g].attrs;for(n in v){l=v[n].length;p={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(d=0;d<l;d++){a=v[n][d];p[r.compMethod[n]].target=a[0];p[r.compMethod[n]][n]=a[1]}if(p.setPosition.target){a=p.setPosition;c=(a.left===undefined)?undefined:parseInt(a.left,10);s=(a.top===undefined)?undefined:parseInt(a.top,10);a.target.setPosition(c,s)}if(p.setPagePosition.target){a=p.setPagePosition;a.target.setPagePosition(a.x,a.y)}if(p.setSize.target){a=p.setSize;u=(a.width===undefined)?a.target.getWidth():parseInt(a.width,10);k=(a.height===undefined)?a.target.getHeight():parseInt(a.height,10);if(b||r.dynamic){a.target.componentLayout.childrenChanged=true;if(r.layoutAnimation){a.target.setCalculatedSize(u,k)}else{a.target.setSize(u,k)}}else{a.target.el.setSize(u,k)}}if(p.setOpacity.target){a=p.setOpacity;a.target.el.setStyle("opacity",a.opacity)}}}}});Ext.define("Ext.fx.target.Element",{extend:"Ext.fx.target.Target",type:"element",getElVal:function(b,a,c){if(c==undefined){if(a==="x"){c=b.getX()}else{if(a==="y"){c=b.getY()}else{if(a==="scrollTop"){c=b.getScroll().top}else{if(a==="scrollLeft"){c=b.getScroll().left}else{if(a==="height"){c=b.getHeight()}else{if(a==="width"){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(l){var g=this.target,k=l.length,n,h,b,e,c,a,d,m;for(e=0;e<k;e++){n=l[e].attrs;for(h in n){if(n.hasOwnProperty(h)){a=n[h].length;for(c=0;c<a;c++){b=n[h][c];d=b[0];m=b[1];if(h==="x"){d.setX(m)}else{if(h==="y"){d.setY(m)}else{if(h==="scrollTop"){d.scrollTo("top",m)}else{if(h==="scrollLeft"){d.scrollTo("left",m)}else{d.setStyle(h,m)}}}}}}}}}});Ext.define("Ext.fx.target.CompositeElement",{extend:"Ext.fx.target.Element",isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,"ext-composite-");this.callParent([a])},getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,this.getElVal(e,a,d)])},this);return b}});Ext.define("Ext.fx.target.ElementCSS",{extend:"Ext.fx.target.Element",setAttr:function(n,e){var q={attrs:[],duration:[],easing:[]},m=n.length,g,p,k,l,c,b,h,d,a;for(h=0;h<m;h++){p=n[h];c=p.duration;l=p.easing;p=p.attrs;for(k in p){if(Ext.Array.indexOf(q.attrs,k)==-1){q.attrs.push(k.replace(/[A-Z]/g,function(i){return"-"+i.toLowerCase()}));q.duration.push(c+"ms");q.easing.push(l)}}}g=q.attrs.join(",");c=q.duration.join(",");l=q.easing.join(", ");for(h=0;h<m;h++){p=n[h].attrs;for(k in p){a=p[k].length;for(d=0;d<a;d++){b=p[k][d];b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",e?"":g);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",e?"":c);b[0].setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",e?"":l);b[0].setStyle(k,b[1]);if(e){b=b[0].dom.offsetWidth}else{b[0].on(Ext.supports.CSS3TransitionEnd,function(){this.setStyle(Ext.supports.CSS3Prefix+"TransitionProperty",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionDuration",null);this.setStyle(Ext.supports.CSS3Prefix+"TransitionTimingFunction",null)},b[0],{single:true})}}}}}});Ext.define("Ext.fx.target.CompositeElementCSS",{extend:"Ext.fx.target.CompositeElement",requires:["Ext.fx.target.ElementCSS"],setAttr:function(){return Ext.fx.target.ElementCSS.prototype.setAttr.apply(this,arguments)}});Ext.define("Ext.fx.target.Sprite",{extend:"Ext.fx.target.Target",type:"draw",getFromPrim:function(b,a){var c;if(a=="translate"){c={x:b.attr.translation.x||0,y:b.attr.translation.y||0}}else{if(a=="rotate"){c={degrees:b.attr.rotation.degrees||0,x:b.attr.rotation.x,y:b.attr.rotation.y}}else{c=b.attr[a]}}return c},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(n){var h=n.length,l=[],r,g,q,e,b,p,o,d,c,m,k,a;for(d=0;d<h;d++){r=n[d].attrs;for(g in r){q=r[g];a=q.length;for(c=0;c<a;c++){b=q[c][0];e=q[c][1];if(g==="translate"){o={x:e.x,y:e.y}}else{if(g==="rotate"){m=e.x;if(isNaN(m)){m=null}k=e.y;if(isNaN(k)){k=null}o={degrees:e.degrees,x:m,y:k}}else{if(g==="width"||g==="height"||g==="x"||g==="y"){o=parseFloat(e)}else{o=e}}}p=Ext.Array.indexOf(l,b);if(p==-1){l.push([b,{}]);p=l.length-1}l[p][1][g]=o}}}h=l.length;for(d=0;d<h;d++){b=l[d];b[0].setAttributes(b[1])}this.target.redraw()}});Ext.define("Ext.fx.target.CompositeSprite",{extend:"Ext.fx.target.Sprite",getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,d!=undefined?d:this.getFromPrim(e,a)])},this);return b}});Ext.define("Ext.layout.Layout",{requires:["Ext.XTemplate"],uses:["Ext.layout.Context"],isLayout:true,initialized:false,running:false,autoSizePolicy:{setsWidth:0,setsHeight:0},sizeModels:{calculated:{name:"calculated",auto:false,calculated:true,configured:false,fixed:true,natural:false,shrinkWrap:false},calculatedFromNatural:{name:"calculatedFromNatural",auto:true,calculated:true,configured:false,fixed:true,natural:true,shrinkWrap:false},calculatedFromShrinkWrap:{name:"calculatedFromShrinkWrap",auto:true,calculated:true,configured:false,fixed:true,natural:false,shrinkWrap:true},configured:{name:"configured",auto:false,calculated:false,configured:true,fixed:true,natural:false,shrinkWrap:false},natural:{name:"natural",auto:true,calculated:false,configured:false,fixed:false,natural:true,shrinkWrap:false},shrinkWrap:{name:"shrinkWrap",auto:true,calculated:false,configured:false,fixed:false,natural:false,shrinkWrap:true}},statics:{layoutsByType:{},create:function(g,e){var k=Ext.ClassManager,c=this.layoutsByType,d,h,b,a,i,j;if(!g||typeof g==="string"){i=g||e;b={}}else{if(g.isLayout){return g}else{b=g;i=g.type||e}}if(!(a=c[i])){d="layout."+i;h=k.getNameByAlias(d);if(!h){j=true}a=k.get(h);if(j||!a){return k.instantiateByAlias(d,b||{})}c[i]=a}return new a(b)}},constructor:function(a){var b=this;b.id=Ext.id(null,b.type+"-");Ext.apply(b,a);b.layoutCount=0},beginLayout:Ext.emptyFn,beginLayoutCycle:Ext.emptyFn,finishedLayout:function(){this.ownerContext=null},redoLayout:Ext.emptyFn,undoLayout:Ext.emptyFn,getAnimatePolicy:function(){return this.animatePolicy},getItemSizePolicy:function(a){return this.autoSizePolicy},isItemBoxParent:function(a){return false},isItemLayoutRoot:function(d){var c=d.getSizeModel(),b=c.width,a=c.height;if(!d.componentLayout.lastComponentSize&&(b.calculated||a.calculated)){return false}return !b.shrinkWrap&&!a.shrinkWrap},isItemShrinkWrap:function(a){return a.shrinkWrap},isRunning:function(){return !!this.ownerContext},getItemsRenderTree:function(d,b){var h=d.length,e,g,c,a;if(h){a=[];for(e=0;e<h;++e){g=d[e];if(!g.rendered){if(b&&(b[g.id]!==undefined)){c=b[g.id]}else{this.configureItem(g);c=g.getRenderTree();if(b){b[g.id]=c}}if(c){a.push(c)}}}}return a},finishRender:Ext.emptyFn,finishRenderItems:function(e,a){var d=a.length,b,c;for(b=0;b<d;b++){c=a[b];if(c.rendering){c.finishRender(b);this.afterRenderItem(c)}}},renderChildren:function(){var b=this,a=b.getLayoutItems(),c=b.getRenderTarget();b.renderItems(a,c)},renderItems:function(a,g){var e=this,d=a.length,b=0,c;if(d){Ext.suspendLayouts();for(;b<d;b++){c=a[b];if(c&&!c.rendered){e.renderItem(c,g,b)}else{if(!e.isValidParent(c,g,b)){e.moveItem(c,g,b)}else{e.configureItem(c)}}}Ext.resumeLayouts(true)}},isValidParent:function(d,e,a){var b=d.el?d.el.dom:Ext.getDom(d),c=(e&&e.dom)||e;if(b&&c){if(typeof a=="number"){return b==c.childNodes[a]}return b.parentNode==c}return false},configureItem:function(a){a.ownerLayout=this},renderItem:function(b,c,a){if(!b.rendered){this.configureItem(b);b.render(c,a);this.afterRenderItem(b)}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a=="number"){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b)},onContentChange:function(){this.owner.updateLayout();return true},initLayout:function(){this.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},afterRenderItem:Ext.emptyFn,onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,afterRemove:function(e){var d=this,c=e.el,b=d.owner,a=[];if(e.rendered){if(d.itemCls){a.push(d.itemCls)}if(b.itemCls){a.push(b.itemCls)}if(a.length){c.removeCls(a)}}delete e.ownerLayout},destroy:function(){var a=this;if(a.targetCls){var b=a.getTarget();if(b){b.removeCls(a.targetCls)}}a.onDestroy()},sortWeightedItems:function(a,d){for(var b=0,c=a.length;b<c;++b){a[b].$i=b}Ext.Array.sort(a,function(g,e){var h=e.weight-g.weight;if(!h){h=g.$i-e.$i;if(g[d]){h=-h}}return h});for(b=0;b<c;++b){delete a[b].$i}}});Ext.define("Ext.layout.component.Component",{extend:"Ext.layout.Layout",type:"component",isComponentLayout:true,monitorChildren:true,nullBox:{},usesContentHeight:true,usesContentWidth:true,usesHeight:true,usesWidth:true,beginLayoutCycle:function(c,n){var j=this,b=j.owner,e=c.ownerCtContext,g=c.heightModel,h=c.widthModel,i=b.el.dom===document.body,d=b.lastBox||j.nullBox,l=b.el.lastBox||j.nullBox,a,k,m;j.callParent(arguments);if(n){if(j.usesContentWidth){++c.consumersContentWidth}if(j.usesContentHeight){++c.consumersContentHeight}if(j.usesWidth){++c.consumersWidth}if(j.usesHeight){++c.consumersHeight}if(e&&!e.hasRawContent){k=b.ownerLayout;if(k.usesWidth){++c.consumersWidth}if(k.usesHeight){++c.consumersHeight}}}if(h.configured){a=!i&&n&&b.width!==l.width;c.setWidth(b.width,a)}else{if(c.isTopLevel&&h.calculated){m=d.width;c.setWidth(m,m!=l.width)}}if(g.configured){a=!i&&n&&b.height!==l.height;c.setHeight(b.height,a)}else{if(c.isTopLevel&&g.calculated){m=d.height;c.setHeight(m,m!=l.height)}}},finishedLayout:function(b){var h=this,l=b.children,a=h.owner,e,c,k,d,g,j;if(l){e=l.length;for(c=0;c<e;c++){k=l[c];k.el.lastBox=k.props}}b.previousSize=h.lastComponentSize;h.lastComponentSize=a.el.lastBox=g=b.props;a.lastBox=d={};j=g.x;if(j!==undefined){d.x=j}j=g.y;if(j!==undefined){d.y=j}j=g.width;if(j!==undefined){d.width=j}j=g.height;if(j!==undefined){d.height=j}h.callParent(arguments)},notifyOwner:function(d){var c=this,a=c.lastComponentSize,e=d.previousSize,b=[a.width,a.height];if(e){b.push(e.width,e.height)}c.owner.afterComponentLayout.apply(c.owner,b)},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},cacheTargetInfo:function(b){var a=this,d=a.targetInfo,c;if(!d){c=b.getEl("getTarget",a);a.targetInfo=d={padding:c.getPaddingInfo(),border:c.getBorderInfo()}}return d},measureAutoDimensions:function(m,i){var r=this,a=r.owner,d=m.heightModel,h=m.widthModel,c=m.boxParent,n=m.isBoxParent,b=m.props,j,s={gotWidth:false,gotHeight:false,isContainer:(j=!m.hasRawContent)},q=i||3,p,e,k=0,g=0,l,o;if(h.shrinkWrap&&m.consumersContentWidth){++k;p=!(q&1);if(j){if(p){s.contentWidth=0;s.gotWidth=true;++g}else{if((s.contentWidth=m.getProp("contentWidth"))!==undefined){s.gotWidth=true;++g}}}else{o=b.contentWidth;if(typeof o=="number"){s.contentWidth=o;s.gotWidth=true;++g}else{if(p){l=true}else{if(!m.hasDomProp("containerChildrenDone")){l=false}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}if(l){if(!isNaN(s.contentWidth=p?0:r.measureContentWidth(m))){m.setContentWidth(s.contentWidth,true);s.gotWidth=true;++g}}}}}else{if(h.natural&&m.consumersWidth){++k;o=b.width;if(typeof o=="number"){s.width=o;s.gotWidth=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(s.width=r.measureOwnerWidth(m))){m.setWidth(s.width,false);s.gotWidth=true;++g}}}}}if(d.shrinkWrap&&m.consumersContentHeight){++k;e=!(q&2);if(j){if(e){s.contentHeight=0;s.gotHeight=true;++g}else{if((s.contentHeight=m.getProp("contentHeight"))!==undefined){s.gotHeight=true;++g}}}else{o=b.contentHeight;if(typeof o=="number"){s.contentHeight=o;s.gotHeight=true;++g}else{if(e){l=true}else{if(!m.hasDomProp("containerChildrenDone")){l=false}else{if(a.noWrap){l=true}else{if(!h.shrinkWrap){l=(m.bodyContext||m).hasDomProp("width")}else{if(n||!c||c.widthModel.shrinkWrap){l=true}else{l=c.hasDomProp("width")}}}}}if(l){if(!isNaN(s.contentHeight=e?0:r.measureContentHeight(m))){m.setContentHeight(s.contentHeight,true);s.gotHeight=true;++g}}}}}else{if(d.natural&&m.consumersHeight){++k;o=b.height;if(typeof o=="number"){s.height=o;s.gotHeight=true;++g}else{if(n||!c){l=true}else{l=c.hasDomProp("width")}if(l){if(!isNaN(s.height=r.measureOwnerHeight(m))){m.setHeight(s.height,false);s.gotHeight=true;++g}}}}}if(c){m.onBoxMeasured()}s.gotAll=g==k;return s},measureContentWidth:function(a){return a.el.getWidth()-a.getFrameInfo().width},measureContentHeight:function(a){return a.el.getHeight()-a.getFrameInfo().height},measureOwnerHeight:function(a){return a.el.getHeight()},measureOwnerWidth:function(a){return a.el.getWidth()}});Ext.define("Ext.layout.component.Auto",{alias:"layout.autocomponent",extend:"Ext.layout.component.Component",type:"autocomponent",setHeightInDom:false,setWidthInDom:false,waitForOuterHeightInDom:false,waitForOuterWidthInDom:false,calculate:function(h){var g=this,e=g.measureAutoDimensions(h),b=h.heightModel,c=h.widthModel,d,a;if(e.gotWidth){if(c.shrinkWrap){g.publishOwnerWidth(h,e.contentWidth)}else{if(g.publishInnerWidth){g.publishInnerWidth(h,e.width)}}}else{if(!c.auto&&g.publishInnerWidth){d=g.waitForOuterWidthInDom?h.getDomProp("width"):h.getProp("width");if(d===undefined){g.done=false}else{g.publishInnerWidth(h,d)}}}if(e.gotHeight){if(b.shrinkWrap){g.publishOwnerHeight(h,e.contentHeight)}else{if(g.publishInnerHeight){g.publishInnerHeight(h,e.height)}}}else{if(!b.auto&&g.publishInnerHeight){a=g.waitForOuterHeightInDom?h.getDomProp("height"):h.getProp("height");if(a===undefined){g.done=false}else{g.publishInnerHeight(h,a)}}}if(!e.gotAll){g.done=false}},calculateOwnerHeightFromContentHeight:function(b,a){return a+b.getFrameInfo().height},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getFrameInfo().width},publishOwnerHeight:function(h,e){var d=this,b=d.owner,a=d.calculateOwnerHeightFromContentHeight(h,e),g,c;if(isNaN(a)){d.done=false}else{g=Ext.Number.constrain(a,b.minHeight,b.maxHeight);if(g==a){c=d.setHeightInDom}else{h.heightModel=d.sizeModels.configured;a=g;if(d.publishInnerHeight){d.publishInnerHeight(h,a)}}h.setHeight(a,c)}},publishOwnerWidth:function(g,b){var e=this,a=e.owner,d=e.calculateOwnerWidthFromContentWidth(g,b),h,c;if(isNaN(d)){e.done=false}else{h=Ext.Number.constrain(d,a.minWidth,a.maxWidth);if(h==d){c=e.setWidthInDom}else{g.widthModel=e.sizeModels.configured;d=h;if(e.publishInnerWidth){e.publishInnerWidth(g,d)}}g.setWidth(d,c)}}});Ext.define("Ext.layout.component.Draw",{alias:"layout.draw",extend:"Ext.layout.component.Auto",type:"draw",measureContentWidth:function(c){var d=c.target,a=d.surface,b=c.getPaddingInfo(),e=c.surfaceBBox||(c.surfaceBBox=a.items.getBBox());if(!d.viewBox){if(d.autoSize){return e.width+b.width}else{return undefined}}else{if(c.heightModel.shrinkWrap){return b.width}else{return e.width/e.height*(c.getProp("contentHeight")-b.height)+b.width}}},measureContentHeight:function(c){var d=c.target,a=d.surface,b=c.getPaddingInfo(),e=c.surfaceBBox||(c.surfaceBBox=a.items.getBBox());if(!c.target.viewBox){if(d.autoSize){return e.height+b.height}else{return undefined}}else{if(c.widthModel.shrinkWrap){return b.height}else{return e.height/e.width*(c.getProp("contentWidth")-b.width)+b.height}}},publishInnerWidth:function(b,a){b.setContentWidth(a-b.getFrameInfo().width,true)},publishInnerHeight:function(b,a){b.setContentHeight(a-b.getFrameInfo().height,true)},finishedLayout:function(c){var b=c.props,a=c.getPaddingInfo();this.owner.surface.setSize(b.contentWidth-a.width,b.contentHeight-a.height);this.callParent(arguments)}});Ext.define("Ext.state.Provider",{mixins:{observable:"Ext.util.Observable"},prefix:"ext-",constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents("statechange");b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent("statechange",b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent("statechange",b,a,c)},decodeValue:function(g){var d=this,c=/^(a|n|d|b|s|o|e)\:(.*)$/,e=c.exec(unescape(g)),b,a,g,h;if(!e||!e[1]){return}a=e[1];g=e[2];switch(a){case"e":return null;case"n":return parseFloat(g);case"d":return new Date(Date.parse(g));case"b":return(g=="1");case"a":b=[];if(g!=""){Ext.each(g.split("^"),function(i){b.push(d.decodeValue(i))},d)}return b;case"o":b={};if(g!=""){Ext.each(g.split("^"),function(i){h=i.split("=");b[h[0]]=d.decodeValue(h[1])},d)}return b;default:return g}},encodeValue:function(e){var g="",d=0,b,a,c;if(e==null){return"e:1"}else{if(typeof e=="number"){b="n:"+e}else{if(typeof e=="boolean"){b="b:"+(e?"1":"0")}else{if(Ext.isDate(e)){b="d:"+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d<a;d++){g+=this.encodeValue(e[d]);if(d!=a-1){g+="^"}}b="a:"+g}else{if(typeof e=="object"){for(c in e){if(typeof e[c]!="function"&&e[c]!==undefined){g+=c+"="+this.encodeValue(e[c])+"^"}}b="o:"+g.substring(0,g.length-1)}else{b="s:"+e}}}}}}return escape(b)}});Ext.define("Ext.state.CookieProvider",{extend:"Ext.state.Provider",constructor:function(a){var b=this;b.path="/";b.expires=new Date(new Date().getTime()+(1000*60*60*24*7));b.domain=null;b.secure=false;b.callParent(arguments);b.state=b.readCookies()},set:function(a,c){var b=this;if(typeof c=="undefined"||c===null){b.clear(a);return}b.setCookie(a,c);b.callParent(arguments)},clear:function(a){this.clearCookie(a);this.callParent(arguments)},readCookies:function(){var e={},j=document.cookie+";",d=/\s?(.*?)=(.*?);/g,i=this.prefix,a=i.length,h,b,g;while((h=d.exec(j))!=null){b=h[1];g=h[2];if(b&&b.substring(0,a)==i){e[b.substr(a)]=this.decodeValue(g)}}return e},setCookie:function(a,c){var b=this;document.cookie=b.prefix+a+"="+b.encodeValue(c)+((b.expires==null)?"":("; expires="+b.expires.toGMTString()))+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")},clearCookie:function(a){var b=this;document.cookie=b.prefix+a+"=null; expires=Thu, 01-Jan-70 00:00:01 GMT"+((b.path==null)?"":("; path="+b.path))+((b.domain==null)?"":("; domain="+b.domain))+((b.secure==true)?"; secure":"")}});Ext.define("Ext.state.LocalStorageProvider",{extend:"Ext.state.Provider",alias:"state.localstorage",constructor:function(){var a=this;a.callParent(arguments);a.store=a.getStorageObject();a.state=a.readLocalStorage()},readLocalStorage:function(){var c=this.store,e=0,a=c.length,h=this.prefix,b=h.length,g={},d;for(;e<a;++e){d=c.key(e);if(d.substring(0,b)==h){g[d.substr(b)]=this.decodeValue(c.getItem(d))}}return g},set:function(a,c){var b=this;b.clear(a);if(typeof c=="undefined"||c===null){return}b.store.setItem(b.prefix+a,b.encodeValue(c));b.callParent(arguments)},clear:function(a){this.store.removeItem(this.prefix+a);this.callParent(arguments)},getStorageObject:function(){try{var a="localStorage" in window&&window.localStorage!==null;if(a){return window.localStorage}}catch(b){return false}}});Ext.define("Ext.state.Manager",{singleton:true,requires:["Ext.state.Provider"],constructor:function(){this.provider=new Ext.state.Provider()},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define("Ext.state.Stateful",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.state.Manager"],stateful:true,saveDelay:100,autoGenIdRe:/^((\w+-)|(ext-comp-))\d{4,}$/i,constructor:function(a){var b=this;a=a||{};if(Ext.isDefined(a.stateful)){b.stateful=a.stateful}if(Ext.isDefined(a.saveDelay)){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents("beforestaterestore","staterestore","beforestatesave","statesave");b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.initStateEvents();b.initState()}},initStateEvents:function(){this.addStateEvents(this.stateEvents)},addStateEvents:function(c){if(!Ext.isArray(c)){c=Array.prototype.slice.call(arguments,0)}var d=this,b=0,a=c.length;for(;b<a;++b){d.on(c[b],d.onStateChange,d)}},onStateChange:function(){var b=this,a=b.saveDelay;if(a>0){if(!b.stateTask){b.stateTask=new Ext.util.DelayedTask(b.saveState,b)}b.stateTask.delay(b.saveDelay)}else{b.saveState()}},saveState:function(){var a=this,c,b;if(a.stateful!==false){c=a.getStateId();if(c){b=a.getState();if(a.fireEvent("beforestatesave",a,b)!==false){Ext.state.Manager.set(c,b);a.fireEvent("statesave",a,b)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this,b=a.stateId;if(!b){b=a.autoGenIdRe.test(String(a.id))?null:a.id}return b},initState:function(){var a=this,c=a.getStateId(),b;if(a.stateful!==false){if(c){b=Ext.state.Manager.get(c);if(b){b=Ext.apply({},b);if(a.fireEvent("beforestaterestore",a,b)!==false){a.applyState(b);a.fireEvent("staterestore",a,b)}}}}},savePropToState:function(g,e,d){var b=this,c=b[g],a=b.initialConfig;if(b.hasOwnProperty(g)){if(!a||a[g]!==c){if(e){e[d||g]=c}return true}}return false},savePropsToState:function(c,b){var a=this;Ext.each(c,function(d){a.savePropToState(d,b)});return b},destroy:function(){var a=this.stateTask;if(a){a.cancel()}this.clearListeners()}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},generation:0,constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,g=e,c=b,a;if(arguments.length==1){g=c;c=d.getKey(g)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,g)}d.map[c]=g}d.generation++;d.length++;d.items.push(g);d.keys.push(c);d.fireEvent("add",d.length-1,g,c);return g},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}d.generation++;b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(g){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(g)){b=arguments.length>1?arguments:g;for(a=b.length;d<a;d++){e.add(b[d])}}else{for(c in g){if(g.hasOwnProperty(c)){if(e.allowFunctions||typeof g[c]!="function"){e.add(c,g[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,g;for(;c<a;c++){g=b[c];if(e.call(d||g,g,c,a)===false){break}}},eachKey:function(e,d){var g=this.keys,b=this.items,c=0,a=g.length;for(;c<a;c++){e.call(d||window,g[c],b[c],c,a)}},findBy:function(e,d){var g=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],g[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.util.MixedCollection: find has been deprecated. Use findBy instead.")}return this.findBy.apply(this,arguments)},insert:function(a,b,e){var d=this,c=b,g=e;if(arguments.length==2){g=c;c=d.getKey(g)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a>=d.length){return d.add(c,g)}d.generation++;d.length++;Ext.Array.splice(d.items,a,0,g);if(typeof c!="undefined"&&c!==null){d.map[c]=g}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,g,c);return g},remove:function(a){this.generation++;return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a<c.length&&a>=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);c.generation++;return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return typeof this.map[this.getKey(a)]!="undefined"},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.generation++;a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(h,b,j,a){var c=this.extractValues(h,b),g=c.length,e=0,d;j=j||0;a=(a||a===0)?a:g-1;for(d=j;d<=a;d++){e+=c[d]}return e},collect:function(k,e,h){var l=this.extractValues(k,e),a=l.length,b={},c=[],j,g,d;for(d=0;d<a;d++){j=l[d];g=String(j);if((h||!Ext.isEmpty(j))&&!b[g]){b[g]=true;c.push(j)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(g,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}g=g||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(g<=a){for(d=g;d<=a;d++){b[b.length]=c[d]}}else{for(d=g;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,g,a){var b=[],e;if(Ext.isString(d)){b.push(new Ext.util.Filter({property:d,value:c,anyMatch:g,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(h){var n=true,o=b.length,j;for(j=0;j<o;j++){var m=b[j],l=m.filterFn,k=m.scope;n=n&&l.call(k,h)}return n};return this.filterBy(e)},filterBy:function(e,d){var j=this,a=new this.self(),h=j.keys,b=j.items,g=b.length,c;a.getKey=j.getKey;for(c=0;c<g;c++){if(e.call(d||j,b[c],h[c])){a.add(h[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(g){return g&&b.test(g[c])},null,e)},findIndexBy:function(e,d,j){var h=this,g=h.keys,b=h.items,c=j||0,a=b.length;for(;c<a;c++){if(e.call(d||h,b[c],g[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=this,g=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c<a;c++){g.add(d[c],b[c])}g.getKey=e.getKey;return g}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",getGroupString:function(a){return a.get(this.property)}});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.addEvents("add","clear","remove","replace");c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,d){var b=this,c;if(arguments.length===1){d=a;a=b.getKey(d)}if(b.containsKey(a)){return b.replace(a,d)}c=b.getData(a,d);a=c[0];d=c[1];b.map[a]=d;++b.length;b.fireEvent("add",b,a,d);return d},replace:function(b,d){var c=this,e=c.map,a;if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;c.fireEvent("replace",c,b,d,a);return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;b.fireEvent("remove",b,a,c);return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=new Ext.util.HashMap();this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(e,c,b){var a=this.all,d;if(a.containsKey(e)){d=a.get(e);c.call(b||d,d)}else{a.on("add",function(i,g,h){if(g==e){c.call(b||h,h);a.un("add",c,b)}})}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.ComponentManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ComponentMgr",singleton:true,typeName:"xtype",create:function(a,b){if(typeof a=="string"){return Ext.widget(a)}if(a.isComponent){return a}return Ext.widget(a.xtype||b,a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}});Ext.define("Ext.AbstractComponent",{requires:["Ext.ComponentQuery","Ext.ComponentManager","Ext.util.ProtoElement"],mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate",elementCt:"Ext.util.ElementContainer",renderable:"Ext.util.Renderable",state:"Ext.state.Stateful"},uses:["Ext.PluginManager","Ext.Element","Ext.DomHelper","Ext.XTemplate","Ext.ComponentQuery","Ext.ComponentLoader","Ext.EventManager","Ext.layout.Context","Ext.layout.Layout","Ext.layout.component.Auto","Ext.LoadMask","Ext.ZIndexManager"],statics:{AUTO_ID:1000,pendingLayouts:null,layoutSuspendCount:0,cancelLayout:function(a){var b=this.runningLayoutContext||this.pendingLayouts;if(b){b.cancelComponent(a)}},flushLayouts:function(){var b=this,a=b.pendingLayouts;if(a&&a.invalidQueue.length){b.pendingLayouts=null;b.runningLayoutContext=a;a.hookMethods({runComplete:function(){b.runningLayoutContext=null;return this.callParent()}});a.run()}},resumeLayouts:function(a){if(this.layoutSuspendCount&&!--this.layoutSuspendCount){if(a){this.flushLayouts()}}},suspendLayouts:function(){++this.layoutSuspendCount},updateLayout:function(b,e){var c=this,a=c.runningLayoutContext,d;if(a){a.queueInvalidate(b)}else{d=c.pendingLayouts||(c.pendingLayouts=new Ext.layout.Context());d.queueInvalidate(b);if(!e&&!c.layoutSuspendCount&&!b.isLayoutSuspended()){c.flushLayouts()}}}},isComponent:true,getAutoId:function(){return ++Ext.AbstractComponent.AUTO_ID},deferLayouts:false,renderTpl:"{%this.renderContent(out,values)%}",tplWriteMode:"overwrite",baseCls:Ext.baseCSSPrefix+"component",disabledCls:Ext.baseCSSPrefix+"item-disabled",ui:"default",uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:"display",styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+"html",autoShow:false,autoRender:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,shrinkWrap:2,weight:0,maskOnDisable:true,_isLayoutRoot:false,constructor:function(c){var e=this,d,a,b;if(c){Ext.apply(e,c);b=e.xhooks;if(b){e.hookMethods(b);delete e.xhooks}}else{c={}}e.initialConfig=c;e.mixins.elementCt.constructor.call(e);e.addEvents("beforeactivate","activate","beforedeactivate","deactivate","added","disable","enable","beforeshow","show","beforehide","hide","removed","beforerender","render","afterrender","beforedestroy","destroy","resize","move","focus","blur");e.getId();e.setupProtoEl();e.mons=[];e.renderData=e.renderData||{};e.renderSelectors=e.renderSelectors||{};if(e.plugins){e.plugins=[].concat(e.plugins);e.constructPlugins()}e.initComponent();Ext.ComponentManager.register(e);e.mixins.observable.constructor.call(e);e.mixins.state.constructor.call(e,c);this.addStateEvents("resize");if(e.plugins){e.plugins=[].concat(e.plugins);for(d=0,a=e.plugins.length;d<a;d++){e.plugins[d]=e.initPlugin(e.plugins[d])}}e.loader=e.getLoader();if(e.renderTo){e.render(e.renderTo)}if(e.autoShow){e.show()}},initComponent:function(){this.constructPlugins();this.setSize(this.width,this.height)},getState:function(){var b=this,c=null,a=b.getSizeModel();if(a.width.configured){c=b.addPropertyToState(c,"width")}if(a.height.configured){c=b.addPropertyToState(c,"height")}return c},addPropertyToState:function(e,d,c){var b=this,a=arguments.length;if(a==3||b.hasOwnProperty(d)){if(a<3){c=b[d]}if(c!==b.initialConfig[d]){(e||(e={}))[d]=c}}return e},show:Ext.emptyFn,animate:function(b){var g=this,k;b=b||{};k=b.to||{};if(Ext.fx.Manager.hasFxBlock(g.id)){return g}if(!b.dynamic&&(k.height||k.width)){var e=(b.from?b.from.width:undefined)||g.getWidth(),l=e,d=(b.from?b.from.height:undefined)||g.getHeight(),c=d,a=false;if(k.height&&k.height>d){c=k.height;a=true}if(k.width&&k.width>e){l=k.width;a=true}if(a){var j=!Ext.isNumber(g.width),i=!Ext.isNumber(g.height);g.setSize(l,c,g.ownerCt);g.el.setSize(e,d);if(j){delete g.width}if(i){delete g.height}}}return g.mixins.animate.animate.apply(g,arguments)},onHide:function(){this.updateLayout({isRoot:false})},onShow:function(){this.updateLayout({isRoot:false})},constructPlugin:function(a){if(a.ptype&&typeof a.init!="function"){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a=="string"){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var d=this,b=d.plugins,c,a;if(b){for(c=0,a=b.length;c<a;c++){b[c]=d.constructPlugin(b[c])}}},initPlugin:function(a){a.init(this);return a},updateAria:Ext.emptyFn,registerFloatingItem:function(b){var a=this;if(!a.floatingItems){a.floatingItems=new Ext.ZIndexManager(a)}a.floatingItems.register(b)},unregisterFloatingItem:function(b){var a=this;if(a.floatingItems){a.floatingItems.unregister(b)}},layoutSuspendCount:0,suspendLayouts:function(){var a=this;if(!a.rendered){return}if(++a.layoutSuspendCount==1){a.suspendLayout=true}},resumeLayouts:function(b){var a=this;if(!a.rendered){return}if(!--a.layoutSuspendCount){a.suspendLayout=false;if(b&&!a.isLayoutSuspended()){a.updateLayout(b)}}},setupProtoEl:function(){var b=this,a=[b.baseCls,b.getComponentLayout().targetCls];if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.Component: cmpCls has been deprecated. Please use componentCls.")}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}b.protoEl=new Ext.util.ProtoElement({cls:a.join(" ")})},setUI:function(g){var e=this,b=Ext.Array.clone(e.uiCls),h=[],d=[],a,c;for(c=0;c<b.length;c++){a=b[c];d=d.concat(e.removeClsWithUI(a,true));h.push(a)}if(d.length){e.removeCls(d)}e.removeUIFromElement();e.ui=g;e.addUIToElement();d=[];for(c=0;c<h.length;c++){a=h[c];d=d.concat(e.addClsWithUI(a,true))}if(d.length){e.addCls(d)}},addClsWithUI:function(c,h){var g=this,e=[],d,b=0,a;if(typeof c==="string"){c=(c.indexOf(" ")<0)?[c]:Ext.String.splitWords(c)}d=c.length;g.uiCls=Ext.Array.clone(g.uiCls);for(;b<d;b++){a=c[b];if(a&&!g.hasUICls(a)){g.uiCls.push(a);e=e.concat(g.addUIClsToElement(a))}}if(h!==true){g.addCls(e)}return e},removeClsWithUI:function(c,h){var g=this,e=[],b=0,d,a;if(typeof c==="string"){c=(c.indexOf(" ")<0)?[c]:Ext.String.splitWords(c)}d=c.length;for(b=0;b<d;b++){a=c[b];if(a&&g.hasUICls(a)){g.uiCls=Ext.Array.remove(g.uiCls,a);e=e.concat(g.removeUIClsFromElement(a))}}if(h!==true){g.removeCls(e)}return e},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},frameElementsArray:["tl","tc","tr","ml","mc","mr","bl","bc","br"],addUIClsToElement:function(n,a){var l=this,d=l.baseCls+"-"+l.ui+"-"+n,o=[Ext.baseCSSPrefix+n,l.baseCls+"-"+n,d],m=l.frameElementCls;if(!a&&l.frame&&!Ext.supports.CSS3BorderRadius){var j=l.frameElementsArray,h=j.length,g=0,b,e,k;for(;g<h;g++){e=j[g];b=l["frame"+e.toUpperCase()];k=d+"-"+e;if(b&&b.dom){b.addCls(k)}else{if(Ext.Array.indexOf(m[e],k)==-1){m[e].push(k)}}}}l.frameElementCls=m;return o},removeUIClsFromElement:function(n,a){var l=this,d=l.baseCls+"-"+l.ui+"-"+n,o=[Ext.baseCSSPrefix+n,l.baseCls+"-"+n,d],m=l.frameElementCls;if(!a&&l.frame&&!Ext.supports.CSS3BorderRadius){var j=l.frameElementsArray,h=j.length,g=0,b,e,k;for(;g<h;g++){e=j[g];b=l["frame"+e.toUpperCase()];k=d+"-"+e;if(b&&b.dom){b.addCls(k)}else{Ext.Array.remove(m[e],k)}}}l.frameElementCls=m;return o},addUIToElement:function(){var j=this,k=j.baseCls+"-"+j.ui,l=j.frameElementCls;j.addCls(k);if(j.frame&&!Ext.supports.CSS3BorderRadius){var g=j.frameElementsArray,e=g.length,d=0,a,b,h;for(;d<e;d++){b=g[d];a=j["frame"+b.toUpperCase()];h=k+"-"+b;if(a){a.addCls(h)}else{if(!Ext.Array.contains(l[b],h)){l[b].push(h)}}}}},removeUIFromElement:function(){var j=this,k=j.baseCls+"-"+j.ui,l=j.frameElementCls;j.removeCls(k);if(j.frame&&!Ext.supports.CSS3BorderRadius){var g=j.frameElementsArray,e=g.length,d=0,a,b,h;for(;d<e;d++){b=g[d];a=j["frame"+b.toUpperCase()];h=k+"-"+b;if(a){a.removeCls(h)}else{Ext.Array.remove(l[b],h)}}}},getTpl:function(a){return Ext.XTemplate.getTpl(this,a)},initStyles:function(j){var d=this,b=Ext.Element,g=d.padding,c=d.margin,h=d.x,e=d.y,a,i;if(g!==undefined){j.setStyle("padding",b.unitizeBox((g===true)?5:g))}if(c!==undefined){j.setStyle("margin",b.unitizeBox((c===true)?5:c))}if(d.border!==undefined){d.setBorder(d.border,j)}if(d.cls){j.addCls(d.cls);delete d.cls}if(d.style){j.setStyle(d.style);delete d.style}if(h!==undefined){j.setStyle("left",h+"px")}if(e!==undefined){j.setStyle("top",e+"px")}if(!d.getFrameInfo()){a=d.width;i=d.height;if(typeof a=="number"){j.setStyle("width",a+"px")}if(typeof i=="number"){j.setStyle("height",i+"px")}}},initEvents:function(){var c=this,e=c.afterRenderEvents,b,d,a=function(g){c.mon(b,g)};if(e){for(d in e){if(e.hasOwnProperty(d)){b=c[d];if(b&&b.on){Ext.each(e[d],a)}}}}c.addFocusListener()},addFocusListener:function(){var c=this,b=c.getFocusEl(),a;if(b){if(b.isComponent){return b.addFocusListener()}a=b.needsTabIndex();if(!c.focusListenerAdded&&(!a||Ext.FocusManager.enabled)){if(a){b.dom.tabIndex=-1}b.on({focus:c.onFocus,blur:c.onBlur,scope:c});c.focusListenerAdded=true}}},getFocusEl:Ext.emptyFn,isFocusable:function(d){var b=this,a;if((b.focusable!==false)&&(a=b.getFocusEl())&&b.rendered&&!b.destroying&&!b.isDestroyed&&!b.disabled&&b.isVisible(true)){if(a.isComponent){return a.isFocusable()}return a&&a.dom&&a.isVisible()}},preFocus:Ext.emptyFn,onFocus:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(!c.disabled){c.preFocus(d);if(b&&a){a.addCls(c.addClsWithUI(b,true))}if(!c.hasFocus){c.hasFocus=true;c.fireEvent("focus",c,d)}}},beforeBlur:Ext.emptyFn,onBlur:function(d){var c=this,b=c.focusCls,a=c.getFocusEl();if(c.destroying){return}c.beforeBlur(d);if(b&&a){a.removeCls(c.removeClsWithUI(b,true))}if(c.validateOnBlur){c.validate()}c.hasFocus=false;c.fireEvent("blur",c,d);c.postBlur(d)},postBlur:Ext.emptyFn,is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.ownerCt;if(b){for(;a;a=a.ownerCt){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},nextSibling:function(b){var g=this.ownerCt,d,e,a,h;if(g){d=g.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a<e;a++){if((h=d.getAt(a)).is(b)){return h}}}else{if(a<d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,g;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a>=0;a--){if((g=d.getAt(a)).is(b)){return g}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(c,d){var h=this,b,g,a,e;if(d&&h.is(c)){return h}b=this.prev(c);if(b){return b}if(h.ownerCt){for(g=h.ownerCt.items.items,e=Ext.Array.indexOf(g,h)-1;e>-1;e--){if(g[e].query){b=g[e].query(c);b=b[b.length-1];if(b){return b}}}return h.ownerCt.previousNode(c,true)}},nextNode:function(c,d){var h=this,b,g,a,e;if(d&&h.is(c)){return h}b=this.next(c);if(b){return b}if(h.ownerCt){for(g=h.ownerCt.items,e=g.indexOf(h)+1,g=g.items,a=g.length;e<a;e++){if(g[e].down){b=g[e].down(c);if(b){return b}}}return h.ownerCt.nextNode(c)}},getId:function(){return this.id||(this.id="ext-comp-"+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},getOverflowStyle:function(){var b=this,a=null;if(typeof b.autoScroll=="boolean"){a={overflow:b.autoScroll?"auto":""}}else{if(b.overflowX!==undefined||b.overflowY!==undefined){a={"overflow-x":(b.overflowX||""),"overflow-y":(b.overflowY||"")}}}if(a&&(Ext.isIE6||Ext.isIE7)){a.position="relative"}return a},isXType:function(b,a){if(a){return this.xtype===b}else{return this.xtypesMap[b]}},getXTypes:function(){var c=this.self,d,b,a;if(!c.xtypes){d=[];b=this;while(b){a=b.xtypes;if(a!==undefined){d.unshift.apply(d,a)}b=b.superclass}c.xtypeChain=d;c.xtypes=d.join("/")}return c.xtypes},update:function(b,c,a){var d=this;if(d.tpl&&!Ext.isString(b)){d.data=b;if(d.rendered){d.tpl[d.tplWriteMode](d.getTargetEl(),b||{})}}else{d.html=Ext.isObject(b)?Ext.DomHelper.markup(b):b;if(d.rendered){d.getTargetEl().update(d.html,c,a)}}if(d.rendered){d.doComponentLayout()}},setVisible:function(a){return this[a?"show":"hide"]()},isVisible:function(a){var c=this,e=c,d=!c.hidden,b=c.ownerCt;c.hiddenAncestor=false;if(c.destroyed){return false}if(a&&d&&c.rendered&&b){while(b){if(b.hidden||(b.collapsed&&!(b.getDockedItems&&Ext.Array.contains(b.getDockedItems(),e)))){c.hiddenAncestor=b;d=false;break}e=b;b=b.ownerCt}}return d},enable:function(a){var b=this;b.removeCls(b.disabledCls);if(b.rendered){b.onEnable()}else{b.on({boxready:b.onEnable,scope:b,single:true})}b.disabled=false;delete b.resetDisable;if(a!==true){b.fireEvent("enable",b)}return b},disable:function(a){var b=this;b.addCls(b.disabledCls);if(b.rendered){b.onDisable()}else{b.on({boxready:b.onDisable,scope:b,single:true})}b.disabled=true;if(a!==true){delete b.resetDisable;b.fireEvent("disable",b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.dom.disabled=false;this.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.dom.disabled=true;this.mask()}},mask:function(){var c=this,b=c.lastBox,a=[];if(b){a[2]=b.height}c.el.mask.apply(c.el,a)},unmask:function(){this.el.unmask()},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?"disable":"enable"]()},isHidden:function(){return this.hidden},addCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.addCls.apply(b,arguments);return c},addClass:function(){return this.addCls.apply(this,arguments)},hasCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;return b.hasCls.apply(b,arguments)},removeCls:function(a){var c=this,b=c.rendered?c.el:c.protoEl;b.removeCls.apply(b,arguments);return c},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,g,e,a){var h=this,d,c;if(Ext.isString(b)&&(Ext.isObject(g)||a&&a.element)){if(a.element){d=g;g={};g[b]=d;b=a.element;if(e){g.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(h.eventOptionsRe.test(c)){g[c]=a[c]}}}}if(h[b]&&h[b].on){h.mon(h[b],g)}else{h.afterRenderEvents=h.afterRenderEvents||{};if(!h.afterRenderEvents[b]){h.afterRenderEvents[b]=[]}h.afterRenderEvents[b].push(g)}}return h.mixins.observable.addListener.apply(h,arguments)},removeManagedListenerItem:function(b,a,i,d,g,e){var h=this,c=a.options?a.options.element:null;if(c){c=h[c];if(c&&c.un){if(b||(a.item===i&&a.ename===d&&(!g||a.fn===g)&&(!e||a.scope===e))){c.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(h.managedListeners,a)}}}}else{return h.mixins.observable.removeManagedListenerItem.apply(h,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,b){this.ownerCt=a;this.fireEvent("added",this,a,b)},onRemoved:function(){var a=this;a.fireEvent("removed",a,a.ownerCt);delete a.ownerCt},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(b,a){var c=this;if(b&&typeof b=="object"){a=b.height;b=b.width}if(typeof b=="number"){c.width=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(typeof a=="number"){c.height=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(c.rendered&&c.isVisible()){c.updateLayout({isRoot:false})}return c},isLayoutRoot:function(){var a=this,b=a.ownerLayout;if(!b||a._isLayoutRoot||a.floating){return true}return b.isItemLayoutRoot(a)},isLayoutSuspended:function(){var a=this,b;while(a){if(a.layoutSuspendCount||a.suspendLayout){return true}b=a.ownerLayout;if(!b){break}a=b.owner}return false},updateLayout:function(b){var c=this,d,a=b&&b.isRoot;if(!c.rendered||c.layoutSuspendCount||c.suspendLayout){return}if(c.hidden){Ext.AbstractComponent.cancelLayout(c)}else{if(typeof a!="boolean"){a=c.isLayoutRoot()}}if(a||!c.ownerLayout||!c.ownerLayout.onContentChange(c)){if(!c.isLayoutSuspended()){d=(b&&b.hasOwnProperty("defer"))?b.defer:c.deferLayouts;Ext.AbstractComponent.updateLayout(c,d)}}},getSizeModel:function(d){var h=this,j=Ext.layout.Layout.prototype,a=j.sizeModels,b,i,e,g,c;if(typeof h.width=="number"){c=a.configured}if(typeof h.height=="number"){b=a.configured}if(!c||!b){if(h.floating){e=j.autoSizePolicy;g=3}else{if(!(i=h.ownerLayout)){e=j.autoSizePolicy;g=h.shrinkWrap}else{e=i.getItemSizePolicy(h);g=i.isItemShrinkWrap(h)}g=(g===true)?3:(g||0);if(g!==3){if(!d){d=h.ownerCt&&h.ownerCt.getSizeModel()}if(d){g|=(d.width.shrinkWrap?1:0)|(d.height.shrinkWrap?2:0)}}}if(!c){if(!e.setsWidth){c=(g&1)?a.shrinkWrap:a.natural}else{if(e.readsWidth){c=(g&1)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}else{c=a.calculated}}}if(!b){if(!e.setsHeight){b=(g&2)?a.shrinkWrap:a.natural}else{if(e.readsHeight){b=(g&2)?a.calculatedFromShrinkWrap:a.calculatedFromNatural}else{b=a.calculated}}}}return{width:c,height:b}},isDescendant:function(a){if(a.isContainer){for(var b=this.ownerCt;b;b=b.ownerCt){if(b===a){return true}}}return false},doComponentLayout:function(){this.updateLayout();return this},forceComponentLayout:function(){this.doComponentLayout()},setComponentLayout:function(b){var a=this.componentLayout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,"autocomponent"))}return a.componentLayout},afterComponentLayout:function(c,a,b,d){if(++this.componentLayoutCounter===1){this.afterFirstLayout()}if(c!==b||a!==d){this.fireEvent("resize",this,c,a,b,d)}},beforeComponentLayout:function(b,a){return true},setPosition:function(a,e,b){var c=this,d=c.beforeSetPosition.apply(c,arguments);if(d&&c.rendered){d=c.convertPosition(d);if(b){c.stopAnimation();c.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(c.afterSetPosition,c,[d.left,d.top])},to:d},b))}else{if(d.left!==undefined&&d.top!==undefined){c.el.setLeftTop(d.left,d.top)}else{if(d.left!==undefined){c.el.setLeft(d.left)}else{if(d.top!==undefined){c.el.setTop(d.top)}}}c.afterSetPosition(d.left,d.top)}}return c},beforeSetPosition:function(a,e,b){var d,c;if(!a||Ext.isNumber(a)){d={x:a,y:e,anim:b}}else{if(Ext.isNumber(c=a[0])){d={x:c,y:a[1],anim:e}}else{d={x:a.x,y:a.y,anim:e}}}d.hasX=Ext.isNumber(d.x);d.hasY=Ext.isNumber(d.y);this.x=d.x;this.y=d.y;return(d.hasX||d.hasY)?d:null},afterSetPosition:function(a,b){this.onPosition(a,b);this.fireEvent("move",this,a,b)},convertPosition:function(d,b){var a={},c=Ext.Element;if(d.hasX){a.left=b?c.addUnits(d.x):d.x}if(d.hasY){a.top=b?c.addUnits(d.y):d.y}return a},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=new Ext.ComponentLoader(Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setDocked:function(b,c){var a=this;a.dock=b;if(c&&a.ownerCt&&a.rendered){a.ownerCt.doComponentLayout()}return a},setBorder:function(b,d){var c=this,a=!!d;if(c.rendered||a){if(!a){d=c.el}if(!b){b=0}else{b=Ext.Element.unitizeBox((b===true)?1:b)}d.setStyle("border-width",b);if(!a){c.updateLayout()}}c.border=b},onDestroy:function(){var a=this;if(a.monitorResize&&Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask,a.floatingItems)},destroy:function(){var d=this,b=d.renderSelectors,a,c;if(!d.isDestroyed){if(d.fireEvent("beforedestroy",d)!==false){d.destroying=true;d.beforeDestroy();if(d.floating){delete d.floatParent;if(d.zIndexManager){d.zIndexManager.unregister(d)}}else{if(d.ownerCt&&d.ownerCt.remove){d.ownerCt.remove(d,false)}}d.onDestroy();Ext.destroy(d.plugins);d.fireEvent("destroy",d);Ext.ComponentManager.unregister(d);d.mixins.state.destroy.call(d);d.clearListeners();if(d.rendered){Ext.AbstractComponent.cancelLayout(d);d.el.remove();d.mixins.elementCt.destroy.call(d);if(b){for(a in b){if(b.hasOwnProperty(a)){c=d[a];delete d[a];c.remove()}}}delete d.el;delete d.frameBody;delete d.rendered}d.destroying=false;d.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c<d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})}},function(){var a=this;a.createAlias({on:"addListener",prev:"previousSibling",next:"nextSibling"});Ext.resumeLayouts=function(b){a.resumeLayouts(b)};Ext.suspendLayouts=function(){a.suspendLayouts()};Ext.batchLayouts=function(c,b){a.suspendLayouts();c.call(b);a.resumeLayouts(true)}});Ext.define("Ext.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.ModelMgr",requires:["Ext.data.association.Association"],singleton:true,typeName:"mtype",associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{if(!b.extend){b.extend="Ext.data.Model"}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,g=a.length,e=[],b,d,h;for(d=0;d<g;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,g=e.length;d<g;d++){h=e[d];this.types[h.ownerModel].prototype.associations.add(Ext.data.association.Association.create(h));Ext.Array.remove(a,h)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a]}return a},create:function(c,b,d){var a=typeof b=="function"?b:this.types[b||c.name];return new a(c,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.PluginManager",{extend:"Ext.AbstractManager",alternateClassName:"Ext.PluginMgr",singleton:true,typeName:"ptype",create:function(a,b){if(a.init){return a}else{return Ext.createByAlias("plugin."+(a.ptype||b),a)}},findByType:function(c,g){var e=[],b=this.types;for(var a in b){if(!b.hasOwnProperty(a)){continue}var d=b[a];if(d.type==c&&(!g||(g===true&&d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define("Ext.fx.Queue",{requires:["Ext.util.HashMap"],constructor:function(){this.targets=new Ext.util.HashMap();this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&&!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&&a[0]&&a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!="element"){d.target.on("destroy",function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on("afteranimate",function(){d.paused=false})}}else{d.paused=false}d.on("afteranimate",function(){Ext.Array.remove(a,d);if(d.remove){if(e.type=="element"){var g=Ext.get(e.id);if(g){g.remove()}}}},this);a.push(d)}});Ext.define("Ext.util.Point",{extend:"Ext.util.Region",statics:{fromEvent:function(a){a=(a.changedTouches&&a.changedTouches.length>0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x==a.x&&this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x<=b.x+a.x&&this.x>=b.x-a.x&&this.y<=b.y+a.y&&this.y>=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&&Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=new Ext.util.AbstractMixedCollection(false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(h,g,c,e){var d=this,i,b,a;if(Ext.isArray(h)){e=c;c=g;a=h}else{if(Ext.isObject(h)){e=c;c=g;a=[h]}else{if(Ext.isString(h)){i=d.sorters.get(h);if(!i){i={property:h,direction:g};a=[i]}else{if(g===undefined){i.toggle()}else{i.setDirection(g)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){h=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(h)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}}if(e!==false){d.onBeforeSort(a);h=d.sorters.items;if(h.length){d.doSort(d.generateComparator())}}return h},generateComparator:function(){return(this.sorters.items.length)?(function(a){return function(d,c){var b=a[0].sort(d,c),g=a.length,e;for(e=1;e<g;e++){b=b||a[e].sort.call(this,d,c)}return b}})(this.sorters.items):function(){return 0}},onBeforeSort:Ext.emptyFn,decodeSorters:function(g){if(!Ext.isArray(g)){if(g===undefined){g=[]}else{g=[g]}}var d=g.length,h=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=g[c];if(!(b instanceof h)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}g[c]=new Ext.util.Sorter(b)}}return g},getSorters:function(){return this.sorters.items}});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var a=this;a.callParent(arguments);a.addEvents("sort");a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(l,a,k){var j=this,d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],m=j.keys,g=j.items;k=k||function(i,c){return i-c};for(d=0,e=g.length;d<e;d++){h[h.length]={key:m[d],value:g[d],index:d}}Ext.Array.sort(h,function(i,c){var n=k(i[l],c[l])*b;if(n===0){n=(i.index<c.index?-1:1)}return n});for(d=0,e=h.length;d<e;d++){g[d]=h[d].value;m[d]=h[d].key}j.fireEvent("sort",j)},sortBy:function(c){var h=this,b=h.items,g=h.keys,e=b.length,a=[],d;for(d=0;d<e;d++){a[d]={key:g[d],value:b[d],index:d}}Ext.Array.sort(a,function(j,i){var k=c(j.value,i.value);if(k===0){k=(j.index<i.index?-1:1)}return k});for(d=0;d<e;d++){b[d]=a[d].value;g[d]=a[d].key}h.fireEvent("sort",h,b,g)},findInsertionIndex:function(e,d){var g=this,b=g.items,i=0,a=b.length-1,c,h;if(!d){d=g.generateComparator()}while(i<=a){c=(i+a)>>1;h=d(e,b[c]);if(h>=0){i=c+1}else{if(h<0){a=c-1}}}return i},reorder:function(d){var h=this,b=h.items,c=0,g=b.length,a=[],e=[],i;h.suspendEvents();for(i in d){a[d[i]]=b[i]}for(c=0;c<g;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<g;c++){if(a[c]==undefined){a[c]=e.shift()}}h.clear();h.addAll(a);h.resumeEvents();h.fireEvent("sort",h)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var g=String(d).toUpperCase(),e=String(c).toUpperCase();return g>e?1:(g<e?-1:0)})}});Ext.define("Ext.container.DockingContainer",{requires:["Ext.util.MixedCollection","Ext.Element"],isDockingContainer:true,defaultDockWeights:{top:{render:1,visual:1},left:{render:3,visual:5},right:{render:5,visual:7},bottom:{render:7,visual:3}},addDocked:function(a,g){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b<c;b++){d=a[b];d.dock=d.dock||"top";if(e.border===false){}if(g!==undefined){e.dockedItems.insert(g+b,d)}else{e.dockedItems.add(d)}d.onAdded(e,b);e.onDockedAdd(d)}if(e.rendered&&!e.suspendLayout){e.updateLayout()}return a},destroyDockedItems:function(){var a=this.dockedItems,b;if(a){while((b=a.first())){this.removeDocked(b,true)}}},doRenderDockedItems:function(c,g,h){var e=g.$comp,d=e.componentLayout;if(d.getDockedItems&&!g.$skipDockedItems){var b=d.getDockedItems("render",!h),a=b&&d.getItemsRenderTree(b);if(a){Ext.DomHelper.generateMarkup(a,c)}}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getDockedItems:function(a,c){var b=this.getComponentLayout().getDockedItems("render",c);if(a&&b.length){b=Ext.ComponentQuery.query(a,b)}return b},getDockingRefItems:function(b,e){var a=b&&"*,* *",d=this.getDockedItems(a,true),c;d.push.apply(d,e);c=this.getDockedItems(a,false);d.push.apply(d,c);return d},initDockingItems:function(){var b=this,a=b.dockedItems;b.dockedItems=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){b.addDocked(a)}},insertDocked:function(b,a){this.addDocked(a,b)},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,removeDocked:function(e,b){var d=this,c,a;if(!d.dockedItems.contains(e)){return e}c=d.componentLayout;a=c&&d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved();d.onDockedRemove(e);if(b===true||(b!==false&&d.autoDestroy)){e.destroy()}else{if(a){c.afterRemove(e)}}if(!d.destroying&&!d.suspendLayout){d.doComponentLayout()}return e},setupDockingRenderTpl:function(a){a.renderDockedItems=this.doRenderDockedItems}});Ext.define("Ext.data.AbstractStore",{requires:["Ext.util.MixedCollection","Ext.data.Operation","Ext.util.Filter"],mixins:{observable:"Ext.util.Observable",sortable:"Ext.util.Sortable"},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},remoteSort:false,remoteFilter:false,autoLoad:undefined,autoSync:false,batchUpdateMode:"operation",filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:"memory",isDestroyed:false,isStore:true,sortRoot:"data",constructor:function(a){var c=this,b;Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:{}});if(!c.model&&c.fields){c.model=Ext.define("Ext.data.Store.ImplicitModel-"+(c.storeId||Ext.id()),{extend:"Ext.data.Model",fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());c.proxy.on("metachange",c.onMetaChange,c);if(c.id&&!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=new Ext.util.MixedCollection();c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias("proxy."+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},onMetaChange:function(a,b){this.fireEvent("metachange",this,b)},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:"create",records:[a]});b=new Ext.data.Operation(c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"update",records:c.getUpdatedRecords()});a=new Ext.data.Operation(b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},onCreateRecords:Ext.emptyFn,onUpdateRecords:Ext.emptyFn,onDestroyRecords:function(b,a,c){if(c){this.removed=[]}},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:"destroy",records:c.getRemovedRecords()});a=new Ext.data.Operation(b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var g=this,b=c.operations,e=b.length,d;g.suspendEvents();for(d=0;d<e;d++){g.onProxyWrite(b[d])}g.resumeEvents();g.fireEvent("datachanged",g);g.fireEvent("refresh",g)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&&a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},getModifiedRecords:function(){return[].concat(this.getNewRecords(),this.getUpdatedRecords())},filterUpdated:function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c<d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:"data"});if(b.fn){b.filterFn=b.fn}if(typeof b=="function"){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(c){var e=this,b={},g=e.getNewRecords(),d=e.getUpdatedRecords(),a=e.getRemovedRecords(),h=false;if(g.length>0){b.create=g;h=true}if(d.length>0){b.update=d;h=true}if(a.length>0){b.destroy=a;h=true}if(h&&e.fireEvent("beforesync",b)!==false){c=c||{};e.proxy.batch(Ext.apply(c,{operations:b,listeners:e.getBatchListeners()}))}return e},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode=="operation"){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=b||{};b.action=b.action||"read";b.filters=b.filters||c.filters.items;b.sorters=b.sorters||c.getSorters();a=new Ext.data.Operation(b);if(c.fireEvent("beforeload",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},afterEdit:function(a,e){var d=this,b,c;if(d.autoSync&&!d.autoSyncSuspended){for(b=e.length;b--;){if(a.fields.get(e[b]).persist){c=true;break}}if(c){d.sync()}}d.fireEvent("update",d,a,Ext.data.Model.EDIT,e)},afterReject:function(a){this.fireEvent("update",this,a,Ext.data.Model.REJECT,null)},afterCommit:function(a){this.fireEvent("update",this,a,Ext.data.Model.COMMIT,null)},destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=null;a.tree=null;a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}},clearData:Ext.emptyFn,getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading},suspendAutoSync:function(){this.autoSyncSuspended=true},resumeAutoSync:function(){this.autoSyncSuspended=false}});Ext.define("Ext.data.Errors",{extend:"Ext.util.MixedCollection",isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.field==e){d.push(a)}}return d}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.MixedCollection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),g=c,d,a;if(e){g=[];for(d=0,a=c.length;d<a;++d){g.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return new Ext.data.ArrayStore({data:g,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=new Ext.data.Store(b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.data.proxy.Ajax",{requires:["Ext.util.MixedCollection","Ext.Ajax"],extend:"Ext.data.proxy.Server",alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(h,i,g){c.processResponse(i,a,d,g,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.util.Observable"},requires:["Ext.ModelManager","Ext.data.IdGenerator","Ext.data.Field","Ext.data.Errors","Ext.data.Operation","Ext.data.validations","Ext.data.proxy.Ajax","Ext.util.MixedCollection"],sortConvertFields:function(a,d){var c=a.type&&a.convert!==a.type.convert,b=d.type&&d.convert!==d.type.convert;if(c&&!b){return 1}if(!c&&b){return -1}return 0},itemNameFn:function(a){return a.name},onClassExtended:function(b,c,a){var d=a.onBeforeCreated;a.onBeforeCreated=function(g,D){var C=this,E=Ext.getClassName(g),q=g.prototype,w=g.prototype.superclass,h=D.validations||[],s=D.fields||[],y=D.associations||[],x=D.belongsTo,r=D.hasMany,t=D.hasOne,e=function(G,I){var H=0,F,J;if(G){G=Ext.Array.from(G);for(F=G.length;H<F;++H){J=G[H];if(!Ext.isObject(J)){J={model:J}}J.type=I;y.push(J)}}},u=D.idgen,A=new Ext.util.MixedCollection(false,q.itemNameFn),z=new Ext.util.MixedCollection(false,q.itemNameFn),p=w.validations,B=w.fields,l=w.associations,j,v,n,o=[],m=g.prototype.idProperty,k=Ext.Function.bind(A.sortBy,A,[q.sortConvertFields],false);g.modelName=E;q.modelName=E;if(p){h=p.concat(h)}D.validations=h;if(B){s=B.items.concat(s)}A.on({add:k,replace:k});for(v=0,n=s.length;v<n;++v){A.add(new Ext.data.Field(s[v]))}if(!A.get(m)){A.add(new Ext.data.Field(m))}D.fields=A;if(u){D.idgen=Ext.data.IdGenerator.get(u)}e(D.belongsTo,"belongsTo");delete D.belongsTo;e(D.hasMany,"hasMany");delete D.hasMany;e(D.hasOne,"hasOne");delete D.hasOne;if(l){y=l.items.concat(y)}for(v=0,n=y.length;v<n;++v){o.push("association."+y[v].type.toLowerCase())}if(D.proxy){if(typeof D.proxy==="string"){o.push("proxy."+D.proxy)}else{if(typeof D.proxy.type==="string"){o.push("proxy."+D.proxy.type)}}}Ext.require(o,function(){Ext.ModelManager.registerType(E,g);for(v=0,n=y.length;v<n;++v){j=y[v];Ext.apply(j,{ownerModel:E,associatedModel:j.model});if(Ext.ModelManager.getModel(j.model)===undefined){Ext.ModelManager.registerDeferredAssociation(j)}else{z.add(Ext.data.association.Association.create(j))}}D.associations=z;d.call(C,g,D,a);g.setProxy(g.prototype.proxy||g.prototype.defaultProxyType);Ext.ModelManager.onModelDefined(g)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a=="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){return this.proxy},setFields:function(b){var e=this,d=e.prototype.fields,a=b.length,c=0;if(d){d.clear()}else{d=e.prototype.fields=new Ext.util.MixedCollection(false,function(g){return g.name})}for(;c<a;c++){d.add(new Ext.data.Field(b[c]))}e.fields=d;return d},getFields:function(){return this.fields},load:function(g,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:"read",id:g});var b=new Ext.data.Operation(c),d=c.scope||this,a=null,e;e=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};this.proxy.read(b,e,this)}},statics:{PREFIX:"ext-record",AUTO_ID:1,EDIT:"edit",REJECT:"reject",COMMIT:"commit",id:function(a){var b=[this.PREFIX,"-",this.AUTO_ID++].join("");a.phantom=true;a.internalId=b;return b}},idgen:{isGenerator:true,type:"default",generate:function(){return null},getRecId:function(a){return a.modelName+"-"+a.internalId}},editing:false,dirty:false,persistenceProperty:"data",evented:false,isModel:true,phantom:false,idProperty:"id",clientIdProperty:"clientId",defaultProxyType:"ajax",constructor:function(j,d,o,b){j=j||{};var l=this,k,e,m,a,n,g,c,h;l.internalId=(d||d===0)?d:Ext.data.Model.id(l);l.raw=o;if(!l.data){l.data={}}l.modified={};if(l.persistanceProperty){l.persistenceProperty=l.persistanceProperty}l[l.persistenceProperty]=b||{};l.mixins.observable.constructor.call(l);if(!b){k=l.fields.items;e=k.length;h=0;c=l[l.persistenceProperty];if(Ext.isArray(j)){for(;h<e;h++){m=k[h];a=m.name;n=j[h];if(n===undefined){n=m.defaultValue}if(m.convert){n=m.convert(n,l)}c[a]=n}}else{for(;h<e;h++){m=k[h];a=m.name;n=j[a];if(n===undefined){n=m.defaultValue}if(m.convert){n=m.convert(n,l)}c[a]=n}}}l.stores=[];if(l.getId()){l.phantom=false}else{if(l.phantom){g=l.idgen.generate();if(g!==null){l.setId(g)}}}l.dirty=false;l.modified={};if(typeof l.init=="function"){l.init()}l.id=l.idgen.getRecId(l)},get:function(a){return this[this.persistenceProperty][a]},set:function(o,k){var h=this,e=h.fields,n=h.modified,c=[],j,m,d,l,b,g,a;if(arguments.length==1&&Ext.isObject(o)){b=!h.editing;g=0;e=h.fields.items;a=e.length;for(d=0;d<a;d++){j=e[d].name;if(o.hasOwnProperty(j)){if(!g&&b){h.beginEdit()}++g;h.set(j,o[j])}}if(b&&g){h.endEdit(false,c)}}else{e=h.fields;if(e){j=e.get(o);if(j&&j.convert){k=j.convert(k,h)}}l=h.get(o);h[h.persistenceProperty][o]=k;if(j&&j.persist&&!h.isEqual(l,k)){if(h.isModified(o)){if(h.isEqual(n[o],k)){delete n[o];h.dirty=false;for(m in n){if(n.hasOwnProperty(m)){h.dirty=true;break}}}}else{h.dirty=true;n[o]=l}}if(o===h.idProperty&&l!==k){h.fireEvent("idchanged",h,l,k)}if(!h.editing){h.afterEdit([o])}}},isEqual:function(d,c){if(Ext.isDate(d)&&Ext.isDate(c)){return Ext.Date.isEqual(d,c)}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a[a.persistenceProperty]);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistenceProperty]=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a,c){var b=this,d;if(b.editing){b.editing=false;if(!c){c=b.getModifiedFieldNames()}d=b.dirty||c.length>0;delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(d&&a!==true){b.afterEdit(c)}}},getModifiedFieldNames:function(){var d=this,c=d.dataSave,e=d[d.persistenceProperty],a=[],b;for(b in e){if(e.hasOwnProperty(b)){if(!d.isEqual(e[b],c[b])){a.push(b)}}}return a},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var b=this,a;b.dirty=true;b.fields.each(function(c){if(c.persist){a=c.name;b.modified[a]=b.get(a)}},b)},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c[c.persistenceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var b=this;b.phantom=b.dirty=b.editing=false;b.modified={};if(a!==true){b.afterCommit()}},copy:function(a){var b=this;return new b.self(Ext.apply({},b[b.persistenceProperty]),a)},setProxy:function(a){if(!a.isProxy){if(typeof a==="string"){a={type:a}}a=Ext.createByAlias("proxy."+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.proxy},validate:function(){var k=new Ext.data.Errors(),c=this.validations,e=Ext.data.validations,b,d,j,a,h,g;if(c){b=c.length;for(g=0;g<b;g++){d=c[g];j=d.field||d.name;h=d.type;a=e[h](d,this.get(j));if(!a){k.add({field:j,message:d.message||e[h+"Message"]})}}}return k},isValid:function(){return this.validate().isValid()},save:function(m){m=Ext.apply({},m);var g=this,b=g.phantom?"create":"update",l=m.scope||g,j=g.stores,c=0,e,h,d,a,k;Ext.apply(m,{records:[g],action:b});a=new Ext.data.Operation(m);k=function(i){d=[g,i];if(i.wasSuccessful()){for(e=j.length;c<e;c++){h=j[c];h.fireEvent("write",h,i);h.fireEvent("datachanged",h)}Ext.callback(m.success,l,d)}else{Ext.callback(m.failure,l,d)}Ext.callback(m.callback,l,d)};g.getProxy()[b](a,k,g);return g},destroy:function(l){l=Ext.apply({},l);var e=this,k=l.scope||e,h=e.stores,b=0,d,g,c,a,j;Ext.apply(l,{records:[e],action:"destroy"});a=new Ext.data.Operation(l);j=function(i){c=[e,i];if(i.wasSuccessful()){for(d=h.length;b<d;b++){g=h[b];g.fireEvent("write",g,i);g.fireEvent("datachanged",g)}e.clearListeners();Ext.callback(l.success,k,c)}else{Ext.callback(l.failure,k,c)}Ext.callback(l.callback,k,c)};e.getProxy().destroy(a,j,e);return e},getId:function(){return this.get(this.idProperty)},getObservableId:function(){return this.id},setId:function(a){this.set(this.idProperty,a);this.phantom=!(a||a===0)},join:function(a){Ext.Array.include(this.stores,a)},unjoin:function(a){Ext.Array.remove(this.stores,a)},afterEdit:function(a){this.callStore("afterEdit",a)},afterReject:function(){this.callStore("afterReject")},afterCommit:function(){this.callStore("afterCommit")},callStore:function(g){var d=Ext.Array.clone(arguments),b=this.stores,e=0,a=b.length,c,h;d[0]=this;for(;e<a;++e){c=b[e];if(c&&typeof c[g]=="function"){c[g].apply(c,d)}h=c.treeStore;if(h&&typeof h[g]=="function"){h[g].apply(h,d)}}},getData:function(b){var c=this,d={},a;c.fields.each(function(e){a=e.name;d[a]=c.get(a)},c);if(b===true){Ext.apply(d,c.getAssociatedData())}return d},getAssociatedData:function(){return this.prepareAssociatedData(this,[],null)},prepareAssociatedData:function(p,a,o){var k=p.associations.items,m=k.length,e={},g,h,r,s,d,c,n,l,q,b;for(n=0;n<m;n++){d=k[n];q=d.type;b=true;if(o){b=q==o}if(b&&q=="hasMany"){g=p[d.storeName];e[d.name]=[];if(g&&g.getCount()>0){h=g.data.items;s=h.length;for(l=0;l<s;l++){r=h[l];c=r.id;if(Ext.Array.indexOf(a,c)==-1){a.push(c);e[d.name][l]=r.getData();Ext.apply(e[d.name][l],this.prepareAssociatedData(r,a,q))}}}}else{if(b&&(q=="belongsTo"||q=="hasOne")){r=p[d.instanceName];if(r!==undefined){c=r.id;if(Ext.Array.indexOf(a,c)===-1){a.push(c);e[d.name]=r.getData();Ext.apply(e[d.name],this.prepareAssociatedData(r,a,q))}}}}}return e}});Ext.define("Ext.data.Store",{extend:"Ext.data.AbstractStore",alias:"store.store",requires:["Ext.data.StoreManager","Ext.ModelManager","Ext.data.Model","Ext.util.Grouper"],uses:["Ext.data.proxy.Memory"],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:"ASC",numFromEdge:25,trailingBufferZone:25,leadingBufferZone:200,pageSize:undefined,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,clearRemovedOnLoad:true,isStore:true,statics:{recordIdFn:function(a){return a.internalId},recordIndexFn:function(a){return a.index}},onClassExtended:function(b,d,a){var c=d.model;if(typeof c=="string"){var e=a.onBeforeCreated;a.onBeforeCreated=function(){var h=this,g=arguments;Ext.require(c,function(){e.apply(h,g)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,g=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;if(b.buffered||d.buffered){d.prefetchData=new Ext.util.MixedCollection(false,Ext.data.Store.recordIndexFn);d.pendingRequests=[];d.pagesRequested=[];d.sortOnLoad=false;d.filterOnLoad=false}e=b.data||d.data;d.data=new Ext.util.MixedCollection(false,Ext.data.Store.recordIdFn);if(e){d.inlineData=e;delete b.data}if(!g&&a){g=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=new Ext.util.MixedCollection();d.groupers.addAll(d.decodeGroupers(g));this.callParent([b]);if(d.groupers.items.length){d.sort(d.groupers.items,"prepend",false)}c=d.proxy;e=d.inlineData;if(!d.buffered&&!d.pageSize){d.pageSize=25}if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,[e])}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad==="object"?d.autoLoad:undefined])}}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()>0){this.sort(a.items,"prepend",false)}},decodeGroupers:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,g=Ext.util.Grouper,b,c,a=[];for(c=0;c<d;c++){b=e[c];if(!(b instanceof g)){if(Ext.isString(b)){b={property:b}}b=Ext.apply({root:"data",direction:"ASC"},b);if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}a.push(new g(b))}else{a.push(b)}}return a},group:function(e,g){var d=this,c=false,b,a;if(Ext.isArray(e)){a=e}else{if(Ext.isObject(e)){a=[e]}else{if(Ext.isString(e)){b=d.groupers.get(e);if(!b){b={property:e,direction:g};a=[b]}else{if(g===undefined){b.toggle()}else{b.setDirection(g)}}}}}if(a&&a.length){c=true;a=d.decodeGroupers(a);d.groupers.clear();d.groupers.addAll(a)}if(d.remoteGroup){d.load({scope:d,callback:d.fireGroupChange})}else{d.sort(null,null,null,c);d.fireGroupChange()}},clearGrouping:function(){var a=this;a.groupers.each(function(b){a.sorters.remove(b)});a.groupers.clear();if(a.remoteGroup){a.load({scope:a,callback:a.fireGroupChange})}else{a.sort();a.fireEvent("groupchange",a,a.groupers)}},isGrouped:function(){return this.groupers.getCount()>0},fireGroupChange:function(){this.fireEvent("groupchange",this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],k={},g,h,j,e;for(e=0;e<a;e++){g=d[e];h=this.getGroupString(g);j=k[h];if(j===undefined){j={name:h,children:[]};c.push(j);k[h]=j}j.children.push(g)}return b?k[b]:c},getGroupsForGrouper:function(g,b){var d=g.length,e=[],a,c,j,k,h;for(h=0;h<d;h++){j=g[h];c=b.getGroupString(j);if(c!==a){k={name:c,grouper:b,records:[]};e.push(k)}k.records.push(j);a=c}return e},getGroupsForGrouperIndex:function(c,j){var g=this,h=g.groupers,b=h.getAt(j),a=g.getGroupsForGrouper(c,b),e=a.length,d;if(j+1<h.length){for(d=0;d<e;d++){a[d].children=g.getGroupsForGrouperIndex(a[d].records,j+1)}}for(d=0;d<e;d++){a[d].depth=j}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return a.get(b.property)}return""},insert:function(d,c){var h=this,g=false,e,b,a;c=[].concat(c);for(e=0,a=c.length;e<a;e++){b=h.createModel(c[e]);b.set(h.modelDefaults);c[e]=b;h.data.insert(d+e,b);b.join(h);g=g||b.phantom===true}if(h.snapshot){h.snapshot.addAll(c)}if(h.requireSort){h.suspendEvents();h.sort();h.resumeEvents()}h.fireEvent("add",h,c,d);h.fireEvent("datachanged",h);if(h.autoSync&&g&&!h.autoSyncSuspended){h.sync()}},add:function(b){if(!Ext.isArray(b)){b=Array.prototype.slice.apply(arguments)}var e=this,c=0,d=b.length,a,g=e.sorters&&e.sorters.items.length;if(g&&d===1){return[e.addSorted(e.createModel(b[0]))]}for(;c<d;c++){a=e.createModel(b[c]);b[c]=a}if(g){e.requireSort=true}e.insert(e.data.length,b);delete e.requireSort;return b},addSorted:function(a){var b=this.data.findInsertionIndex(a,this.generateComparator());this.insert(b,a);return a},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},each:function(b,a){this.data.each(b,a)},remove:function(b,k){if(!Ext.isArray(b)){b=[b]}k=k===true;var g=this,h=false,c=0,a=b.length,j,e,d;for(;c<a;c++){d=b[c];e=g.data.indexOf(d);if(g.snapshot){g.snapshot.remove(d)}if(e>-1){j=d.phantom===true;if(!k&&!j){g.removed.push(d)}d.unjoin(g);g.data.remove(d);h=h||!j;g.fireEvent("remove",g,d,e)}}g.fireEvent("datachanged",g);if(!k&&g.autoSync&&h&&!g.autoSyncSuspended){g.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(typeof a=="function"){a={callback:a}}a.groupers=a.groupers||b.groupers.items;a.page=a.page||b.currentPage;a.start=a.start||(b.currentPage-1)*b.pageSize;a.limit=a.limit||b.pageSize;a.addRecords=a.addRecords||false;return b.callParent([a])},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;d.fireEvent("load",d,a,e);d.fireEvent("read",d,a,b.wasSuccessful());Ext.callback(b.callback,b.scope||d,[a,b,e])},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(g,h){if(Ext.isString(g)){g={property:g,value:h}}var e=this,a=e.decodeFilters(g),b=0,d,j=e.sorters.length&&e.sortOnFilter&&!e.remoteSort,c=a.length;for(;b<c;b++){e.filters.replace(a[b])}if(e.remoteFilter){if(e.buffered){d=e.getCount();e.prefetchData.clear();e.prefetchPage(1,{callback:function(k,i,l){if(l){e.guaranteedStart=0;e.guaranteedEnd=k.length-1;e.loadRecords(Ext.Array.slice(k,0,d))}}})}else{e.currentPage=1;e.load()}}else{if(e.filters.getCount()){e.snapshot=e.snapshot||e.data.clone();e.data=e.data.filter(e.filters.items);if(j){e.sort()}else{e.fireEvent("datachanged",e);e.fireEvent("refresh",e)}}}},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){b.currentPage=1;b.load()}else{if(b.isFiltered()){b.data=b.snapshot.clone();delete b.snapshot;if(a!==true){b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}}}},isFiltered:function(){var a=this.snapshot;return !!a&&a!==this.data},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent("datachanged",c);c.fireEvent("refresh",c)},queryBy:function(b,a){var c=this,d=c.snapshot||c.data;return d.filterBy(b,a||c)},loadData:function(h,a){var c=this.model,g=h.length,e=[],d,b;for(d=0;d<g;d++){b=h[d];if(!(b instanceof Ext.data.Model)){b=Ext.ModelManager.create(b,c)}e.push(b)}this.loadRecords(e,{addRecords:a})},loadRawData:function(e,b){var d=this,a=d.proxy.reader.read(e),c=a.records;if(a.success){d.totalCount=a.total;d.loadRecords(c,{addRecords:b});d.fireEvent("load",d,c,true)}},loadRecords:function(b,c){var g=this,d=0,e=b.length,h=(c=c||{}).start,a=g.snapshot;if(!c.addRecords){delete g.snapshot;g.clearData(true)}else{if(a){a.addAll(b)}}g.data.addAll(b);if(typeof h!="undefined"){for(;d<e;d++){b[d].index=h+d;b[d].join(g)}}else{for(;d<e;d++){b[d].join(g)}}g.suspendEvents();if(g.filterOnLoad&&!g.remoteFilter){g.filter()}if(g.sortOnLoad&&!g.remoteSort){g.sort()}g.resumeEvents();g.fireEvent("datachanged",g,b);g.fireEvent("refresh",g)},loadPage:function(c,a){var b=this;b.currentPage=c;b.read(Ext.apply({page:c,start:(c-1)*b.pageSize,limit:b.pageSize,addRecords:!b.clearOnPageLoad},a))},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)},clearData:function(d){var c=this,a=c.data.items,b=a.length;while(b--){a[b].unjoin(c)}c.data.clear();if(d!==true||c.clearRemovedOnLoad){c.removed=[]}},prefetch:function(b){var c=this,a,d=c.getRequestId();b=Ext.apply({action:"read",filters:c.filters.items,sorters:c.sorters.items,requestId:d},b);c.pendingRequests.push(d);a=new Ext.data.Operation(b);if(c.fireEvent("beforeprefetch",c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyPrefetch,c)}return c},prefetchPage:function(e,c){var d=this,b=d.pageSize||25,g=(e-1)*d.pageSize,a=g+b;if(Ext.Array.indexOf(d.pagesRequested,e)===-1&&!d.rangeSatisfied(g,a)){d.pagesRequested.push(e);c=Ext.apply({page:e,start:g,limit:b,callback:d.onWaitForGuarantee,scope:d},c);d.prefetch(c)}},getRequestId:function(){this.requestSeed=this.requestSeed||1;return this.requestSeed++},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total;d.fireEvent("totalcountchange",d.totalCount)}if(e){d.cacheRecords(a,b)}Ext.Array.remove(d.pendingRequests,b.requestId);if(b.page){Ext.Array.remove(d.pagesRequested,b.page)}d.loading=false;d.fireEvent("prefetch",d,a,e,b);if(b.blocking){d.fireEvent("load",d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},cacheRecords:function(b,a){var e=this,c=0,d=b.length,g=a?a.start:0;if(!Ext.isDefined(e.totalCount)){e.totalCount=b.length;e.fireEvent("totalcountchange",e.totalCount)}for(;c<d;c++){b[c].index=g+c}e.prefetchData.addAll(b);if(!e.hasPendingRequests()&&e.suspendPurge){e.suspendParge=false;return}if(e.purgePageCount&&!e.suspendPurge){e.purgeRecords()}},purgeRecords:function(){var c=this,b=c.prefetchData.getCount(),d=c.purgePageCount*c.pageSize,e=b-d-1,a=0;for(;a<=e;a++){c.prefetchData.removeAt(0)}},rangeSatisfied:function(e,a){var c=this,b=e,d=true;for(;b<a;b++){if(!c.prefetchData.getByKey(b)){d=false;break}}return d},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(){var g=this,c=g.getTotalCount(),h=g.requestStart,b=((c-1)<g.requestEnd)?c-1:g.requestEnd,d=[],a,e=h;b=Math.max(0,b);if(h!==g.guaranteedStart&&b!==g.guaranteedEnd){g.guaranteedStart=h;g.guaranteedEnd=b;for(;e<=b;e++){a=g.prefetchData.getByKey(e);if(a){d.push(a)}}g.fireEvent("guaranteedrange",d,h,b);if(g.cb){g.cb.call(g.scope||g,d)}}g.unmask()},mask:function(){this.masked=true;this.fireEvent("beforeload")},unmask:function(){if(this.masked){this.fireEvent("load")}},hasPendingRequests:function(){return this.pendingRequests.length},onWaitForGuarantee:function(b,a,c){if(!this.hasPendingRequests()){this.onGuaranteedRange()}},guaranteeRange:function(a,d,b,j){d=(d>this.totalCount)?this.totalCount-1:d;var h=this,e,i,g,c=h.requestStart;h.cb=b;h.scope=j;h.requestStart=a;h.requestEnd=d;if(h.rangeSatisfied(a,d)){if(a<c){d=Math.min(d+h.numFromEdge+h.trailingBufferZone,h.totalCount-1);a=Math.max(d-(h.pageSize-1),0)}else{a=Math.max(Math.min(a-h.numFromEdge-h.trailingBufferZone,h.totalCount-h.pageSize),0);d=a+(h.pageSize-1)}if(!h.rangeSatisfied(a,d)){e=h.getPageFromRecordIndex(a);i=h.getPageFromRecordIndex(d)}h.onGuaranteedRange()}else{a=Math.min(Math.max(a-h.numFromEdge-((h.leadingBufferZone-h.trailingBufferZone)/2),0),h.totalCount-h.pageSize);d=a+(h.pageSize-1);e=h.getPageFromRecordIndex(a);i=h.getPageFromRecordIndex(d)}if(e!==undefined){h.suspendPurge=(i!==e);for(g=e;g<=i;g++){h.prefetchPage(g)}}},sort:function(){var d=this,c=d.prefetchData,e,g,a,b;if(d.buffered){if(d.remoteSort){c.clear();d.callParent(arguments)}else{e=d.getSorters();g=d.guaranteedStart;a=d.guaranteedEnd;if(e.length){c.sort(e);b=c.getRange();c.clear();d.cacheRecords(b);delete d.guaranteedStart;delete d.guaranteedEnd;d.guaranteeRange(g,a)}d.callParent(arguments)}}else{d.callParent(arguments)}},doSort:function(b){var g=this,e;if(g.remoteSort){if(g.buffered){e=g.getCount();g.prefetchData.clear();g.prefetchPage(1,{callback:function(i,h,j){if(j){g.guaranteedStart=0;g.guaranteedEnd=i.length-1;g.loadRecords(Ext.Array.slice(i,0,e))}}})}else{g.load()}}else{g.data.sortBy(b);if(!g.buffered){var a=g.getRange(),d=a.length,c=0;for(;c<d;c++){a[c].index=c}}g.fireEvent("datachanged",g);g.fireEvent("refresh",g)}},find:function(e,d,h,g,a,c){var b=this.createFilterFn(e,d,g,a,c);return b?this.data.findIndexBy(b,null,h):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(g){return c.test(g.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)===a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&&d.snapshot)?d.snapshot:d.data;return e.collect(b,"data",a)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return(this.snapshot||this.data).findBy(function(b){return b.getId()===a})},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){var b=a.index;if(b||b===0){return b}return this.indexOf(a)},indexOfId:function(a){return this.indexOf(this.getById(a))},removeAll:function(a){var b=this;b.clearData();if(b.snapshot){b.snapshot.clear()}if(a!==true){b.fireEvent("clear",b)}},first:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&&b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,g){var d=1,a=b.length,e,c;if(a>0){c=b[0].get(g)}for(;d<a;++d){e=b[d].get(g);if(e<c){c=e}}return c},max:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,g){var d=1,b=c.length,e,a;if(b>0){a=c[0].get(g)}for(;d<b;++d){e=c[d].get(g);if(e>a){a=e}}return a},average:function(c,a){var b=this;if(a&&b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(h,k,e,g){g=g||[];if(e&&this.isGrouped()){var a=this.getGroups(),c=0,d=a.length,b={},j;for(;c<d;++c){j=a[c];b[j.name]=h.apply(k||this,[j.children].concat(g))}return b}else{return h.apply(k||this,[this.data.items].concat(g))}},commitChanges:function(){var c=this,d=c.getModifiedRecords(),a=d.length,b=0;for(;b<a;b++){d[b].commit()}c.removed.length=0},rejectChanges:function(){var c=this,d=c.getModifiedRecords(),a=d.length,b=0;for(;b<a;b++){d[b].reject();if(d[b].phantom){c.remove(d[b])}}d=c.removed;a=d.length;for(b=0;b<a;b++){c.insert(0,d[b]);d[b].reject()}c.removed.length=0}},function(){Ext.regStore("ext-empty-store",{fields:[],proxy:"proxy"})});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",uses:["Ext.data.reader.Array"],constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:"memory",reader:"array"}});this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b<c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.data.BufferStore",{extend:"Ext.data.Store",alias:"store.buffer",sortOnLoad:false,filterOnLoad:false,constructor:function(){Ext.Error.raise("The BufferStore class has been deprecated. Instead, specify the buffered config option on Ext.data.Store")}});Ext.define("Ext.data.JsonPStore",{extend:"Ext.data.Store",alias:"store.jsonp",constructor:function(a){this.callParent(Ext.apply(a,{reader:new Ext.data.reader.Json(a),proxy:new Ext.data.proxy.JsonP(a)}))}});Ext.define("Ext.data.JsonStore",{extend:"Ext.data.Store",alias:"store.json",constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:"ajax",reader:"json",writer:"json"}});this.callParent([a])}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],node:null,recursive:false,rootVisible:false,constructor:function(a){var c=this,b;a=a||{};Ext.apply(c,a);a.proxy={type:"proxy"};c.callParent([a]);b=c.node;if(b){c.node=null;c.setNode(b)}},setNode:function(b){var a=this;if(a.node&&a.node!=b){a.mun(a.node,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=null}if(b){Ext.data.NodeInterface.decorate(b.self);a.removeAll();if(a.rootVisible){a.add(b)}else{if(!b.isExpanded()&&a.autoLoad!==false){b.expand()}}a.mon(b,{expand:a.onNodeExpand,collapse:a.onNodeCollapse,append:a.onNodeAppend,insert:a.onNodeInsert,remove:a.onNodeRemove,sort:a.onNodeSort,scope:a});a.node=b;if(b.isExpanded()&&b.isLoaded()){a.onNodeExpand(b,b.childNodes,true)}}},onNodeSort:function(b,c){var a=this;if((a.indexOf(b)!==-1||(b===a.node&&!a.rootVisible)&&b.isExpanded())){a.onNodeCollapse(b,c,true);a.onNodeExpand(b,c,true)}},onNodeExpand:function(g,d,c){var j=this,a=j.indexOf(g)+1,h=d?d.length:0,e,b;if(!j.recursive&&g!==j.node){return}if(g!==this.node&&!j.isVisible(g)){return}if(!c&&j.fireEvent("beforeexpand",g,d,a)===false){return}if(h){j.insert(a,d);for(e=0;e<h;e++){b=d[e];if(b.isExpanded()){if(b.isLoaded()){j.onNodeExpand(b,b.childNodes,true)}else{b.set("expanded",false);b.expand()}}}}if(!c){j.fireEvent("expand",g,d)}},onNodeCollapse:function(g,c,b){var j=this,h=c.length,e=j.indexOf(g)+1,d,a;if(!j.recursive&&g!==j.node){return}if(!b&&j.fireEvent("beforecollapse",g,c,e)===false){return}for(d=0;d<h;d++){a=c[d];j.remove(a);if(a.isExpanded()){j.onNodeCollapse(a,a.childNodes,true)}}if(!b){j.fireEvent("collapse",g,c,e)}},onNodeAppend:function(d,g,b){var e=this,a,c;if(e.isVisible(g)){if(b===0){a=d}else{c=g.previousSibling;while(c.isExpanded()&&c.lastChild){c=c.lastChild}a=c}e.insert(e.indexOf(a)+1,g);if(!g.isLeaf()&&g.isExpanded()){if(g.isLoaded()){e.onNodeExpand(g,g.childNodes,true)}else{g.set("expanded",false);g.expand()}}}},onNodeInsert:function(c,e,a){var d=this,b=this.indexOf(a);if(b!=-1&&d.isVisible(e)){d.insert(b,e);if(!e.isLeaf()&&e.isExpanded()){if(e.isLoaded()){d.onNodeExpand(e,e.childNodes,true)}else{e.set("expanded",false);e.expand()}}}},onNodeRemove:function(b,d,a){var c=this;if(c.indexOf(d)!=-1){if(!d.isLeaf()&&d.isExpanded()){c.onNodeCollapse(d,d.childNodes,true)}c.remove(d)}},isVisible:function(b){var a=b.parentNode;while(a){if(a===this.node&&!this.rootVisible&&a.isExpanded()){return true}if(this.indexOf(a)===-1||!a.isExpanded()){return false}a=a.parentNode}return true}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.AbstractStore",alias:"store.tree",requires:["Ext.data.Tree","Ext.data.NodeInterface","Ext.data.NodeStore"],clearOnLoad:true,clearRemovedOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",folderSort:false,constructor:function(c){var d=this,b,a;c=Ext.apply({},c);a=c.fields||d.fields;if(!a){c.fields=[{name:"text",type:"string"}]}d.callParent([c]);d.tree=new Ext.data.Tree();d.relayEvents(d.tree,["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","rootchange"]);d.tree.on({scope:d,remove:d.onNodeRemove,beforeexpand:d.onBeforeNodeExpand,beforecollapse:d.onBeforeNodeCollapse,append:d.onNodeAdded,insert:d.onNodeAdded,sort:d.onNodeSort});d.onBeforeSort();b=d.root;if(b){delete d.root;d.setRootNode(b)}if(Ext.isDefined(d.nodeParameter)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn("Ext.data.TreeStore: nodeParameter has been deprecated. Please use nodeParam instead.")}d.nodeParam=d.nodeParameter;delete d.nodeParameter}},setProxy:function(c){var a,b;if(c instanceof Ext.data.proxy.Proxy){b=Ext.isEmpty(c.getReader().root)}else{if(Ext.isString(c)){b=true}else{a=c.reader;b=!(a&&!Ext.isEmpty(a.root))}}c=this.callParent(arguments);if(b){a=c.getReader();a.root=this.defaultRootProperty;a.buildExtractors(true)}},onBeforeSort:function(){if(this.folderSort){this.sort({property:"leaf",direction:"ASC"},"prepend",false)}},onBeforeNodeExpand:function(b,c,a){if(b.isLoaded()){Ext.callback(c,a||b,[b.childNodes])}else{if(b.isLoading()){this.on("load",function(){Ext.callback(c,a||b,[b.childNodes])},this,{single:true})}else{this.read({node:b,callback:function(){Ext.callback(c,a||b,[b.childNodes])}})}}},getNewRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterNew)},getUpdatedRecords:function(){return Ext.Array.filter(this.tree.flatten(),this.filterUpdated)},onBeforeNodeCollapse:function(b,c,a){c.call(a||b,b.childNodes)},onNodeRemove:function(b,d,a){var c=this,e=c.removed;if(!d.isReplace&&Ext.Array.indexOf(e,d)==-1){e.push(d)}if(c.autoSync&&!c.autoSyncSuspended&&!a){c.sync()}},onNodeAdded:function(d,g){var e=this,c=e.getProxy(),a=c.getReader(),h=g.raw||g.data,i,b;Ext.Array.remove(e.removed,g);if(!g.isLeaf()){i=a.getRoot(h);if(i){e.fillNode(g,a.extractData(i));delete h[a.root]}}if(e.autoSync&&!e.autoSyncSuspended&&(g.phantom||g.dirty)){e.sync()}},onNodeSort:function(){if(this.autoSync&&!this.autoSyncSuspended){this.sync()}},setRootNode:function(a,c){var b=this;a=a||{};if(!a.isModel){Ext.applyIf(a,{id:b.defaultRootId,text:"Root",allowDrag:false});Ext.data.NodeInterface.decorate(b.model);a=Ext.ModelManager.create(a,b.model)}else{if(a.isModel&&!a.isNode){Ext.data.NodeInterface.decorate(b.model)}}b.getProxy().getReader().buildExtractors(true);b.tree.setRootNode(a);if(c!==true&&!a.isLoaded()&&(b.autoLoad===true||a.isExpanded())){b.load({node:a})}return a},getRootNode:function(){return this.tree.getRootNode()},getNodeById:function(a){return this.tree.getNodeById(a)},load:function(b){b=b||{};b.params=b.params||{};var d=this,c=b.node||d.tree.getRootNode(),a;if(!c){c=d.setRootNode({expanded:true},true)}if(d.clearOnLoad){if(d.clearRemovedOnLoad){d.clearRemoved(c)}d.tree.un("remove",d.onNodeRemove,d);c.removeAll(false);d.tree.on("remove",d.onNodeRemove,d)}Ext.applyIf(b,{node:c});b.params[d.nodeParam]=c?c.getId():"root";if(c){c.set("loading",true)}return d.callParent([b])},clearRemoved:function(b){var k=this,e=k.removed,a=b.getId(),d=e.length,c=d,n={},h=[],m={},j,g,l;if(b===k.getRootNode()){k.removed=[];return}for(;c--;){j=e[c];m[j.getId()]=j}for(c=d;c--;){j=e[c];g=j;while(g&&g.getId()!==a){l=g.get("parentId");g=g.parentNode||k.getNodeById(l)||m[l]}if(g){n[j.getId()]=j}}for(c=0;c<d;c++){j=e[c];if(!n[j.getId()]){h.push(j)}}k.removed=h},fillNode:function(g,b){var e=this,d=b?b.length:0,c=0,a;Ext.Array.sort(b,e.sortByIndex);if(d&&e.sortOnLoad&&!e.remoteSort&&e.sorters&&e.sorters.items){a=new Ext.util.MixedCollection();a.addAll(b);a.sort(e.sorters.items);b=a.items}g.set("loaded",true);for(;c<d;c++){g.appendChild(b[c],undefined,true)}return b},sortByIndex:function(b,a){return b.data.index-a.data.index},onProxyLoad:function(b){var d=this,e=b.wasSuccessful(),a=b.getRecords(),c=b.node;d.loading=false;c.set("loading",false);if(e){a=d.fillNode(c,a)}d.fireEvent("read",d,b.node,a,e);d.fireEvent("load",d,b.node,a,e);Ext.callback(b.callback,b.scope||d,[a,b,e])},removeAll:function(){this.getRootNode().destroy(true);this.fireEvent("clear",this)},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.tree.sort(a,true);b.fireEvent("datachanged",b);b.fireEvent("refresh",b)}b.fireEvent("sort",b)}});Ext.define("Ext.data.XmlStore",{extend:"Ext.data.Store",alias:"store.xml",constructor:function(a){a=a||{};a=a||{};Ext.applyIf(a,{proxy:{type:"ajax",reader:"xml",writer:"xml"}});this.callParent([a])}});Ext.define("Ext.data.proxy.Rest",{extend:"Ext.data.proxy.Ajax",alternateClassName:"Ext.data.RestProxy",alias:"proxy.rest",appendId:true,batchActions:false,buildUrl:function(g){var e=this,c=g.operation,b=c.records||[],a=b[0],h=e.format,d=e.getUrl(g),i=a?a.getId():c.id;if(e.appendId&&i){if(!d.match(/\/$/)){d+="/"}d+=i}if(h){if(!d.match(/\.$/)){d+="."}d+=h}g.url=d;return e.callParent(arguments)}},function(){Ext.apply(this.prototype,{actionMethods:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"}})});Ext.define("Ext.direct.Manager",{singleton:true,mixins:{observable:"Ext.util.Observable"},requires:["Ext.util.MixedCollection"],statics:{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"}},constructor:function(){var a=this;a.addEvents("event","exception");a.transactions=new Ext.util.MixedCollection();a.providers=new Ext.util.MixedCollection();a.mixins.observable.constructor.call(a)},addProvider:function(e){var d=this,b=arguments,c=0,a;if(b.length>1){for(a=b.length;c<a;++c){d.addProvider(b[c])}return}if(!e.isProvider){e=Ext.create("direct."+e.type+"provider",e)}d.providers.add(e);e.on("data",d.onProviderData,d);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return a.isProvider?a:this.providers.get(a)},removeProvider:function(c){var b=this,a=b.providers;c=c.isProvider?c:a.get(c);if(c){c.un("data",b.onProviderData,b);a.remove(c);return c}return null},addTransaction:function(a){this.transactions.add(a);return a},removeTransaction:function(a){a=this.getTransaction(a);this.transactions.remove(a);return a},getTransaction:function(a){return Ext.isObject(a)?a:this.transactions.get(a)},onProviderData:function(e,d){var c=this,b=0,a;if(Ext.isArray(d)){for(a=d.length;b<a;++b){c.onProviderData(e,d[b])}return}if(d.name&&d.name!="event"&&d.name!="exception"){c.fireEvent(d.name,d)}else{if(d.status===false){c.fireEvent("exception",d)}}c.fireEvent("event",d,e)},parseMethod:function(c){if(Ext.isString(c)){var e=c.split("."),b=0,a=e.length,d=window;while(d&&b<a){d=d[e[b]];++b}c=Ext.isFunction(d)?d:null}return c||null}},function(){Ext.Direct=Ext.direct.Manager});Ext.define("Ext.data.proxy.Direct",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.DirectProxy",alias:"proxy.direct",requires:["Ext.direct.Manager"],paramOrder:undefined,paramsAsHash:true,directFn:undefined,paramOrderRe:/[\s,|]/,constructor:function(b){var e=this,a,d,c;e.callParent(arguments);a=e.paramOrder;if(Ext.isString(a)){e.paramOrder=a.split(e.paramOrderRe)}d=e.directFn;if(d){e.directFn=Ext.direct.Manager.parseMethod(d)}c=e.api;for(d in c){if(c.hasOwnProperty(d)){c[d]=Ext.direct.Manager.parseMethod(c[d])}}},doRequest:function(d,n,o){var l=this,b=l.getWriter(),e=l.buildRequest(d,n,o),m=l.api[e.action]||l.directFn,j=[],c=e.params,k=l.paramOrder,a,g=0,h;if(d.allowWrite()){e=b.write(e)}if(d.action=="read"){a=m.directCfg.method;if(a.ordered){if(a.len>0){if(k){for(h=k.length;g<h;++g){j.push(c[k[g]])}}else{if(l.paramsAsHash){j.push(c)}}}}else{j.push(c)}}else{j.push(e.jsonData)}Ext.apply(e,{args:j,directFn:m});j.push(l.createRequestCallback(e,d,n,o),l);m.apply(window,j)},applyEncoding:function(a){return a},createRequestCallback:function(d,a,e,b){var c=this;return function(h,g){c.processResponse(g.status,a,d,g,e,b)}},extractResponseData:function(a){return Ext.isDefined(a.result)?a.result:a.data},setException:function(b,a){b.setException(a.message)},buildUrl:function(){return""}});Ext.define("Ext.data.DirectStore",{extend:"Ext.data.Store",alias:"store.direct",requires:["Ext.data.proxy.Direct"],constructor:function(a){a=Ext.apply({},a);if(!a.proxy){var b={type:"direct",reader:{type:"json"}};Ext.copyTo(b,a,"paramOrder,paramsAsHash,directFn,api,simpleSortMode");Ext.copyTo(b.reader,a,"totalProperty,root,idProperty");a.proxy=b}this.callParent([a])}});Ext.define("Ext.direct.Event",{alias:"direct.event",requires:["Ext.direct.Manager"],status:true,constructor:function(a){Ext.apply(this,a)},getData:function(){return this.data}});Ext.define("Ext.direct.RemotingEvent",{extend:"Ext.direct.Event",alias:"direct.rpc",getTransaction:function(){return this.transaction||Ext.direct.Manager.getTransaction(this.tid)}});Ext.define("Ext.direct.ExceptionEvent",{extend:"Ext.direct.RemotingEvent",alias:"direct.exception",status:false});Ext.define("Ext.direct.RemotingProvider",{alias:"direct.remotingprovider",extend:"Ext.direct.JsonProvider",requires:["Ext.util.MixedCollection","Ext.util.DelayedTask","Ext.direct.Transaction","Ext.direct.RemotingMethod"],enableBuffer:10,maxRetries:1,timeout:undefined,constructor:function(a){var b=this;b.callParent(arguments);b.addEvents("beforecall","call");b.namespace=(Ext.isString(b.namespace))?Ext.ns(b.namespace):b.namespace||window;b.transactions=new Ext.util.MixedCollection();b.callBuffer=[]},initAPI:function(){var h=this.actions,e=this.namespace,g,b,c,d,a,j;for(g in h){if(h.hasOwnProperty(g)){b=e[g];if(!b){b=e[g]={}}c=h[g];for(d=0,a=c.length;d<a;++d){j=new Ext.direct.RemotingMethod(c[d]);b[j.name]=this.createHandler(g,j)}}}},createHandler:function(c,d){var b=this,a;if(!d.formHandler){a=function(){b.configureRequest(c,d,Array.prototype.slice.call(arguments,0))}}else{a=function(g,h,e){b.configureFormRequest(c,d,g,h,e)}}a.directCfg={action:c,method:d};return a},isConnected:function(){return !!this.connected},connect:function(){var a=this;if(a.url){a.initAPI();a.connected=true;a.fireEvent("connect",a)}else{if(!a.url){}}},disconnect:function(){var a=this;if(a.connected){a.connected=false;a.fireEvent("disconnect",a)}},runCallback:function(e,b){var d=!!b.status,c=d?"success":"failure",g,a;if(e&&e.callback){g=e.callback;a=Ext.isDefined(b.result)?b.result:b.data;if(Ext.isFunction(g)){g(a,b,d)}else{Ext.callback(g[c],g.scope,[a,b,d]);Ext.callback(g.callback,g.scope,[a,b,d])}}},onData:function(l,j,c){var g=this,d=0,e,k,a,b,h;if(j){k=g.createEvents(c);for(e=k.length;d<e;++d){a=k[d];b=g.getTransaction(a);g.fireEvent("data",g,a);if(b){g.runCallback(b,a,true);Ext.direct.Manager.removeTransaction(b)}}}else{h=[].concat(l.transaction);for(e=h.length;d<e;++d){b=g.getTransaction(h[d]);if(b&&b.retryCount<g.maxRetries){b.retry()}else{a=new Ext.direct.ExceptionEvent({data:null,transaction:b,code:Ext.direct.Manager.self.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:c});g.fireEvent("data",g,a);if(b){g.runCallback(b,a,false);Ext.direct.Manager.removeTransaction(b)}}}}},getTransaction:function(a){return a&&a.tid?Ext.direct.Manager.getTransaction(a.tid):null},configureRequest:function(d,a,g){var h=this,c=a.getCallData(g),e=c.data,i=c.callback,j=c.scope,b;b=new Ext.direct.Transaction({provider:h,args:g,action:d,method:a.name,data:e,callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i});if(h.fireEvent("beforecall",h,b,a)!==false){Ext.direct.Manager.addTransaction(b);h.queueTransaction(b);h.fireEvent("call",h,b,a)}},getCallData:function(a){return{action:a.action,method:a.method,data:a.data,type:"rpc",tid:a.id}},sendRequest:function(h){var g=this,e={url:g.url,callback:g.onData,scope:g,transaction:h,timeout:g.timeout},b,d=g.enableUrlEncode,c=0,a,j;if(Ext.isArray(h)){b=[];for(a=h.length;c<a;++c){b.push(g.getCallData(h[c]))}}else{b=g.getCallData(h)}if(d){j={};j[Ext.isString(d)?d:"data"]=Ext.encode(b);e.params=j}else{e.jsonData=b}Ext.Ajax.request(e)},queueTransaction:function(c){var b=this,a=b.enableBuffer;if(c.form){b.sendFormRequest(c);return}b.callBuffer.push(c);if(a){if(!b.callTask){b.callTask=new Ext.util.DelayedTask(b.combineAndSend,b)}b.callTask.delay(Ext.isNumber(a)?a:10)}else{b.combineAndSend()}},combineAndSend:function(){var b=this.callBuffer,a=b.length;if(a>0){this.sendRequest(a==1?b[0]:b);this.callBuffer=[]}},configureFormRequest:function(e,a,b,i,j){var h=this,c=new Ext.direct.Transaction({provider:h,action:e,method:a.name,args:[b,i,j],callback:j&&Ext.isFunction(i)?Ext.Function.bind(i,j):i,isForm:true}),g,d;if(h.fireEvent("beforecall",h,c,a)!==false){Ext.direct.Manager.addTransaction(c);g=String(b.getAttribute("enctype")).toLowerCase()=="multipart/form-data";d={extTID:c.id,extAction:e,extMethod:a.name,extType:"rpc",extUpload:String(g)};Ext.apply(c,{form:Ext.getDom(b),isUpload:g,params:i&&Ext.isObject(i.params)?Ext.apply(d,i.params):d});h.fireEvent("call",h,c,a);h.sendFormRequest(c)}},sendFormRequest:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,transaction:a})}});Ext.define("Ext.draw.CompositeSprite",{extend:"Ext.util.MixedCollection",mixins:{animate:"Ext.util.Animate"},isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("mousedown","mouseup","mouseover","mouseout","click");b.id=Ext.id(null,"ext-sprite-group-");b.callParent()},onClick:function(a){this.fireEvent("click",a)},onMouseUp:function(a){this.fireEvent("mouseup",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)},onMouseOver:function(a){this.fireEvent("mouseover",a)},onMouseOut:function(a){this.fireEvent("mouseout",a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,n,j,k=this.items,g=this.length,h=Infinity,c=h,m=-h,b=h,l=-h,d,a;for(;e<g;e++){n=k[e];if(n.el){j=n.getBBox();c=Math.min(c,j.x);b=Math.min(b,j.y);m=Math.max(m,j.height+j.y);l=Math.max(l,j.width+j.x)}}return{x:c,y:b,height:m-b,width:l-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d<a;d++){b[d].setAttributes(c,e)}return this},hide:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].hide(d)}return this},show:function(d){var c=0,b=this.items,a=this.length;for(;c<a;c++){b[c].show(d)}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d<a;d++){b.renderItem(c[d])}}return e},setStyle:function(g){var c=0,b=this.items,a=this.length,e,d;for(;c<a;c++){e=b[c];d=e.el;if(d){d.setStyle(g)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d<a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var c=this,a=c.getSurface(),b;if(a){while(c.getCount()>0){b=c.first();c.remove(b);a.remove(b)}}c.clearListeners()}});Ext.define("Ext.chart.LegendItem",{extend:"Ext.draw.CompositeSprite",requires:["Ext.chart.Shape"],x:0,y:0,zIndex:500,constructor:function(a){this.callParent(arguments);this.createLegend(a)},createLegend:function(s){var t=this,i=s.yFieldIndex,l=t.series,a=l.type,m=t.yFieldIndex,d=t.legend,p=t.surface,q=d.x+t.x,n=d.y+t.y,c,k=t.zIndex,b,j,r,e,o=false,h=Ext.apply(l.seriesStyle,l.style);function g(u){var v=l[u];return(Ext.isArray(v)?v[m]:v)}j=t.add("label",p.add({type:"text",x:20,y:0,zIndex:k||0,font:d.labelFont,text:g("title")||g("yField")}));if(a==="line"||a==="scatter"){if(a==="line"){t.add("line",p.add({type:"path",path:"M0.5,0.5L16.5,0.5",zIndex:k,"stroke-width":l.lineWidth,"stroke-linejoin":"round","stroke-dasharray":l.dash,stroke:h.stroke||l.getLegendColor(i)||"#000",style:{cursor:"pointer"}}))}if(l.showMarkers||a==="scatter"){b=Ext.apply(l.markerStyle,l.markerConfig||{},{fill:l.getLegendColor(i)});t.add("marker",Ext.chart.Shape[b.type](p,{fill:b.fill,x:8.5,y:0.5,zIndex:k,radius:b.radius||b.size,style:{cursor:"pointer"}}))}}else{t.add("box",p.add({type:"rect",zIndex:k,x:0,y:0,width:12,height:12,fill:l.getLegendColor(i),style:{cursor:"pointer"}}))}t.setAttributes({hidden:false},true);c=t.getBBox();r=t.add("mask",p.add({type:"rect",x:c.x,y:c.y,width:c.width||20,height:c.height||20,zIndex:(k||0)+1000,fill:"#f00",opacity:0,style:{cursor:"pointer"}}));t.on("mouseover",function(){j.setStyle({"font-weight":"bold"});r.setStyle({cursor:"pointer"});l._index=i;l.highlightItem()},t);t.on("mouseout",function(){j.setStyle({"font-weight":"normal"});l._index=i;l.unHighlightItem()},t);if(!l.visibleInLegend(i)){o=true;j.setAttributes({opacity:0.5},true)}t.on("mousedown",function(){if(!o){l.hideAll();j.setAttributes({opacity:0.5},true)}else{l.showAll();j.setAttributes({opacity:1},true)}o=!o},t);t.updatePosition({x:0,y:0})},updatePosition:function(c){var g=this,a=g.items,e=a.length,b=0,d;if(!c){c=g.legend}for(;b<e;b++){d=a[b];switch(d.type){case"text":d.setAttributes({x:20+c.x+g.x,y:c.y+g.y},true);break;case"rect":d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y-6}},true);break;default:d.setAttributes({translate:{x:c.x+g.x,y:c.y+g.y}},true)}}}});Ext.define("Ext.chart.Legend",{requires:["Ext.chart.LegendItem"],visible:true,position:"bottom",x:0,y:0,labelFont:"12px Helvetica, sans-serif",boxStroke:"#000",boxStrokeWidth:1,boxFill:"#FFF",itemSpacing:10,padding:5,width:0,height:0,boxZIndex:100,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.items=[];b.isVertical=("left|right|float".indexOf(b.position)!==-1);b.origX=b.x;b.origY=b.y},create:function(){var a=this;a.createBox();if(a.rebuild!==false){a.createItems()}if(!a.created&&a.isDisplayed()){a.created=true;a.chart.series.each(function(b){b.on("titlechange",function(){a.create();a.updatePosition()})})}},isDisplayed:function(){return this.visible&&this.chart.series.findIndex("showInLegend",true)!==-1},createItems:function(){var A=this,n=A.chart,s=n.surface,p=A.items,m=A.padding,B=A.itemSpacing,j=2,v=0,r=0,e=0,z=0,b=A.isVertical,d=Math,c=d.floor,C=d.max,h=0,t=0,u=p?p.length:0,l,k,g,w,a,o,q;if(u){for(;t<u;t++){p[t].destroy()}}p.length=[];n.series.each(function(y,x){if(y.showInLegend){Ext.each([].concat(y.yField),function(D,i){w=new Ext.chart.LegendItem({legend:this,series:y,surface:n.surface,yFieldIndex:i});a=w.getBBox();q=a.width;o=a.height;if(x+i===0){g=b?m+o/2:m}else{g=B/(b?2:1)}w.x=c(b?m:e+g);w.y=c(b?z+g:m+o/2);e+=q+g;z+=o+g;v=C(v,q);r=C(r,o);p.push(w)},this)}},A);A.width=c((b?v:e)+m*2);if(b&&p.length===1){j=1}A.height=c((b?z-j*g:r)+(m*2));A.itemHeight=r},getBBox:function(){var a=this;return{x:Math.round(a.x)-a.boxStrokeWidth/2,y:Math.round(a.y)-a.boxStrokeWidth/2,width:a.width,height:a.height}},createBox:function(){var b=this,a,c;if(b.boxSprite){b.boxSprite.destroy()}c=b.getBBox();if(isNaN(c.width)||isNaN(c.height)){b.boxSprite=false;return}a=b.boxSprite=b.chart.surface.add(Ext.apply({type:"rect",stroke:b.boxStroke,"stroke-width":b.boxStrokeWidth,fill:b.boxFill,zIndex:b.boxZIndex},c));a.redraw()},updatePosition:function(){var i=this,l,j,o=i.width||0,m=i.height||0,k=i.padding,h=i.chart,p=h.chartBBox,b=h.insetPadding,d=p.width-(b*2),c=p.height-(b*2),g=p.x+b,e=p.y+b,a=h.surface,q=Math.floor,n;if(i.isDisplayed()){switch(i.position){case"left":l=b;j=q(e+c/2-m/2);break;case"right":l=q(a.width-o)-b;j=q(e+c/2-m/2);break;case"top":l=q(g+d/2-o/2);j=b;break;case"bottom":l=q(g+d/2-o/2);j=q(a.height-m)-b;break;default:l=q(i.origX)+b;j=q(i.origY)+b}i.x=l;i.y=j;Ext.each(i.items,function(r){r.updatePosition()});n=i.getBBox();if(isNaN(n.width)||isNaN(n.height)){if(i.boxSprite){i.boxSprite.hide(true)}}else{if(!i.boxSprite){i.createBox()}i.boxSprite.setAttributes(n,true);i.boxSprite.show(true)}}}});Ext.define("Ext.draw.Surface",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.draw.CompositeSprite"],uses:["Ext.draw.engine.Svg","Ext.draw.engine.Vml","Ext.draw.engine.SvgExporter","Ext.draw.engine.ImageExporter"],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||["Svg","Vml"];var c=0,a=d.length,e;for(;c<a;c++){if(Ext.supports[d[c]]){return Ext.create("Ext.draw.engine."+d[c],b)}}return false},save:function(b,a){var d={"image/png":"Image","image/jpeg":"Image","image/svg+xml":"Svg"},c=d[b.type]||"Svg";return(Ext.draw.engine[c+"Exporter"]).self.generate(b,a)}},availableAttrs:{blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,"dominant-baseline":"auto",fill:"none","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:"",height:0,hidden:false,href:"http://sencha.com/",opacity:1,path:"M0,0",radius:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank",text:"","text-anchor":"middle",title:"Ext Draw",width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents("mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","click");b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){var a=this.gradients;if(a){Ext.each(a,this.addGradient,this)}},initItems:function(){var a=this.items;this.items=new Ext.draw.CompositeSprite();this.groups=new Ext.draw.CompositeSprite();if(a){this.add(a)}},initBackground:function(b){var e=this,d=e.width,a=e.height,g,h,c;if(Ext.isString(b)){b={fill:b}}if(b){if(b.gradient){h=b.gradient;g=h.id;e.addGradient(h);e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:"url(#"+g+")",zIndex:-1000})}else{if(b.fill){e.background=e.add({type:"rect",x:0,y:0,width:d,height:a,fill:b.fill,zIndex:-1000})}else{if(b.image){e.background=e.add({type:"image",x:0,y:0,width:d,height:a,src:b.image,zIndex:-1000})}}}}},setSize:function(a,b){if(this.background){this.background.setAttributes(Ext.apply(this.viewBox===true?{width:a,height:b,x:0,y:0}:this.viewBox||{},{hidden:false}),true)}this.applyViewBox()},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&&!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent("click",a)},onMouseUp:function(a){this.processEvent("mouseup",a)},onMouseDown:function(a){this.processEvent("mousedown",a)},onMouseOver:function(a){this.processEvent("mouseover",a)},onMouseOut:function(a){this.processEvent("mouseout",a)},onMouseMove:function(a){this.fireEvent("mousemove",a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var g=Array.prototype.slice.call(arguments),j,d;var a=g.length>1;if(a||Ext.isArray(g[0])){var h=a?g:g[0],b=[],c,e,k;for(c=0,e=h.length;c<e;c++){k=h[c];k=this.add(k);b.push(k)}return b}j=this.prepareItems(g[0],true)[0];this.insertByZIndex(j);this.onAdd(j);return j},insertByZIndex:function(j){var g=this,d=g.items.items,c=d.length,k=Math.ceil,h=j.attr.zIndex,i=c,b=i-1,e=0,a;if(g.orderSpritesByZIndex&&c&&h<d[b].attr.zIndex){while(e<=b){i=k((e+b)/2);a=d[i].attr.zIndex;if(a>h){b=i-1}else{if(a<h){e=i+1}else{break}}}while(i<c&&d[i].attr.zIndex<=h){i++}}g.items.insert(i,j);return i},onAdd:function(d){var g=d.group,b=d.draggable,a,e,c;if(g){a=[].concat(g);e=a.length;for(c=0;c<e;c++){g=a[c];this.getGroup(g).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(a,b){if(a){this.items.remove(a);this.groups.each(function(c){c.remove(a)});a.onRemove();if(b===true){a.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b>-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,l=d.viewBox,a=d.width,h=d.height,g,e,j,b,i,c,k;if(l&&(a||h)){g=l.x;e=l.y;j=l.width;b=l.height;i=h/b;c=a/j;k=Math.min(c,i);if(j*k<a){g-=(a-j*k)/2/k}if(b*k<h){e-=(h-b*k)/2/k}d.viewBoxShift={dx:-g,dy:-e,scale:k}}},transformToViewBox:function(a,d){if(this.viewBoxShift){var c=this,b=c.viewBoxShift;return[a/b.scale-b.dx,d/b.scale-b.dy]}else{return[a,d]}},applyTransformations:function(b){b.bbox.transform=0;this.transform(b);var d=this,c=false,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){d.translate(b);c=true}if(a.scaling.x!=null||a.scaling.y!=null){d.scale(b);c=true}if(a.rotation.degrees!=null){d.rotate(b);c=true}if(c){b.bbox.transform=0;this.transform(b);b.transformations=[]}},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a,true);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:"rotate",degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:"translate",x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,g=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:"scale",x:a,y:g,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[["M",a+d,e],["l",b-d*2,0],["a",d,d,0,0,1,d,d],["l",0,c-d*2],["a",d,d,0,0,1,-d,d],["l",d*2-b,0],["a",d,d,0,0,1,-d,-d],["l",0,d*2-c],["a",d,d,0,0,1,d,-d],["z"]]}return[["M",a,e],["l",b,0],["l",0,c],["l",-b,0],["z"]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[["M",a,d],["m",0,-b],["a",c,b,0,1,1,0,2*b],["a",c,b,0,1,1,0,-2*b],["z"]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX||(b.width/2)||0,b.radiusY||(b.height/2)||0)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x,b.y,b.width,b.height,b.r)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=new Ext.draw.CompositeSprite({surface:this});a.id=b||Ext.id(null,"ext-surface-group-");this.groups.add(a)}return a},getGroup:function(b){if(typeof b=="string"){var a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b<d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,"ext-surface-"))},destroy:function(){delete this.domRef;this.removeAll();if(this.background){this.background.destroy;delete this.background}}});Ext.define("Ext.fx.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.fx.target.Element","Ext.fx.target.ElementCSS","Ext.fx.target.CompositeElement","Ext.fx.target.CompositeElementCSS","Ext.fx.target.Sprite","Ext.fx.target.CompositeSprite","Ext.fx.target.Component"],mixins:{queue:"Ext.fx.Queue"},constructor:function(){this.items=new Ext.util.MixedCollection();this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&&Ext.supports.Transitions,a;b.useCSS3=c;if(Ext.isString(d)){d=Ext.get(d)}if(d&&d.tagName){d=Ext.get(d);a=new Ext.fx.target["Element"+(c?"CSS":"")](d);b.targets.add(a);return a}if(Ext.isObject(d)){if(d.dom){a=new Ext.fx.target["Element"+(c?"CSS":"")](d)}else{if(d.isComposite){a=new Ext.fx.target["CompositeElement"+(c?"CSS":"")](d)}else{if(d.isSprite){a=new Ext.fx.target.Sprite(d)}else{if(d.isCompositeSprite){a=new Ext.fx.target.CompositeSprite(d)}else{if(d.isComponent){a=new Ext.fx.target.Component(d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(c){var b=this.items,a=this.task;b.add(c.id,c);if(!a&&b.length){a=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(a)}},removeAnim:function(d){var c=this,b=c.items,a=c.task;b.removeAtKey(d.id);if(a&&!b.length){Ext.TaskManager.stop(a);delete c.task}},runner:function(){var d=this,b=d.items.getRange(),c=0,a=b.length,e;d.targetArr={};d.timestamp=new Date();for(;c<a;c++){e=b[c];if(e.isReady()){d.startAnim(e)}}for(c=0;c<a;c++){e=b[c];if(e.isRunning()){d.runAnim(e)}}d.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(e){if(!e){return}var d=this,b=e.target.getId(),h=d.useCSS3&&e.target.type=="element",a=d.timestamp-e.startTime,c=(a>=e.duration),g,i;g=this.collectTargetData(e,a,h,c);if(h){e.target.setAttr(g.anims[e.id].attributes,true);d.collectTargetData(e,e.duration,h,c);e.paused=true;g=e.target.target;if(e.target.isComposite){g=e.target.target.last()}i={};i[Ext.supports.CSS3TransitionEnd]=e.lastFrame;i.scope=e;i.single=true;g.on(i)}},collectTargetData:function(c,a,e,g){var b=c.target.getId(),d=this.targetArr[b];if(!d){d=this.targetArr[b]={id:b,el:c.target,anims:{}}}d.anims[c.id]={id:c.id,anim:c,elapsed:a,isLastFrame:g,attributes:[{duration:c.duration,easing:(e&&c.reverse)?c.easingFn.reverse().toCSS3():c.easing,attrs:c.runAnim(a)}]};return d},applyPendingAttrs:function(){var e=this.targetArr,g,c,b,d,a;for(c in e){if(e.hasOwnProperty(c)){g=e[c];for(a in g.anims){if(g.anims.hasOwnProperty(a)){b=g.anims[a],d=b.anim;if(b.attributes&&d.isRunning()){g.el.setAttr(b.attributes,false,b.isLastFrame);if(b.isLastFrame){d.lastFrame()}}}}}}}});Ext.define("Ext.fx.Animator",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager"],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,"ext-animator-");b.addEvents("beforeanimate","keyframe","afteranimate");b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(g){var k=this,n=[],l=k.to||{},c=k.duration,o,a,e,j,m,b,d,h;for(m in g){if(g.hasOwnProperty(m)&&k.animKeyFramesRE.test(m)){h={attrs:Ext.apply(g[m],l)};if(m=="from"){m=0}else{if(m=="to"){m=100}}h.pct=parseInt(m,10);n.push(h)}}Ext.Array.sort(n,k.sorter);j=n.length;for(e=0;e<j;e++){o=(n[e-1])?c*(n[e-1].pct/100):0;a=c*(n[e].pct/100);k.timeline.push({duration:a-o,attrs:n[e].attrs})}},applyAnimator:function(e){var k=this,l=[],o=k.timeline,g=k.reverse,j=o.length,b,h,a,d,n,m,c;if(k.fireEvent("beforeanimate",k)!==false){for(c=0;c<j;c++){b=o[c];n=b.attrs;h=n.easing||k.easing;a=n.damper||k.damper;delete n.easing;delete n.damper;b=new Ext.fx.Anim({target:e,easing:h,damper:a,duration:b.duration,paused:true,to:n});l.push(b)}k.animations=l;k.target=b.target;for(c=0;c<j-1;c++){b=l[c];b.nextAnim=l[c+1];b.on("afteranimate",function(){this.nextAnim.paused=false});b.on("afteranimate",function(){this.fireEvent("keyframe",this,++this.keyframeStep)},k)}l[j-1].on("afteranimate",function(){this.lastFrame()},k)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent("afteranimate",a,a.startTime,new Date()-a.startTime)}});Ext.define("Ext.fx.Anim",{mixins:{observable:"Ext.util.Observable"},requires:["Ext.fx.Manager","Ext.fx.Animator","Ext.fx.Easing","Ext.fx.CubicBezier","Ext.fx.PropertyHandler"],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:"ease",damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,frameCount:0,constructor:function(a){var b=this,c;a=a||{};if(a.keyframes){return new Ext.fx.Animator(a)}Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&&b.easingFn.length==5){c=b.easingFn;b.easingFn=Ext.fx.CubicBezier.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,"ext-anim-");b.addEvents("beforeanimate","afteranimate","lastframe");b.mixins.observable.constructor.call(b);if(a.callback){b.on("afteranimate",a.callback,a.scope)}Ext.fx.Manager.addAnim(b)},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,h=e.from,i=e.to,g=e.initialFrom||{},c={},a,b,j,d;for(d in i){if(i.hasOwnProperty(d)){a=e.target.getAttr(d,h[d]);b=i[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){j=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{j=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=j.get(a,b,e.damper,g[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a<c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent("beforeanimate",e)!==false){e.startTime=d;if(!e.paused&&!e.currentAttrs){e.initAttrs()}e.running=true;e.frameCount=0}},runAnim:function(l){var i=this,k=i.currentAttrs,d=i.duration,c=i.easingFn,b=i.propHandlers,g={},h,j,e,a;if(l>=d){l=d;a=true}if(i.reverse){l=d-l}for(e in k){if(k.hasOwnProperty(e)){j=k[e];h=a?1:c(l/d);g[e]=b[e].set(j,h)}}i.frameCount++;return g},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b<a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent("lastframe",c,c.startTime)}},end:function(){var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent("afteranimate",a,a.startTime)},isReady:function(){return this.paused===false&&this.running===false&&this.iterations>0},isRunning:function(){return this.paused===false&&this.running===true&&this.isAnimator!==true}});Ext.enableFx=true;Ext.define("Ext.chart.Highlight",{requires:["Ext.fx.Anim"],highlight:false,highlightCfg:{fill:"#fdd","stroke-width":5,stroke:"#f55"},constructor:function(a){if(a.highlight){if(a.highlight!==true){this.highlightCfg=Ext.merge(this.highlightCfg,a.highlight)}}},highlightItem:function(k){if(!k){return}var g=this,j=k.sprite,a=Ext.merge({},g.highlightCfg,g.highlight),d=g.chart.surface,c=g.chart.animate,b,i,h,e;if(!g.highlight||!j||j._highlighted){return}if(j._anim){j._anim.paused=true}j._highlighted=true;if(!j._defaults){j._defaults=Ext.apply({},j.attr);i={};h={};for(b in a){if(!(b in j._defaults)){j._defaults[b]=d.availableAttrs[b]}i[b]=j._defaults[b];h[b]=a[b];if(Ext.isObject(a[b])){i[b]={};h[b]={};Ext.apply(j._defaults[b],j.attr[b]);Ext.apply(i[b],j._defaults[b]);for(e in j._defaults[b]){if(!(e in a[b])){h[b][e]=i[b][e]}else{h[b][e]=a[b][e]}}for(e in a[b]){if(!(e in h[b])){h[b][e]=a[b][e]}}}}j._from=i;j._to=h;j._endStyle=h}if(c){j._anim=new Ext.fx.Anim({target:j,from:j._from,to:j._to,duration:150})}else{j.setAttributes(j._to,true)}},unHighlightItem:function(){if(!this.highlight||!this.items){return}var j=this,h=j.items,g=h.length,a=Ext.merge({},j.highlightCfg,j.highlight),c=j.chart.animate,e=0,d,b,k;for(;e<g;e++){if(!h[e]){continue}k=h[e].sprite;if(k&&k._highlighted){if(k._anim){k._anim.paused=true}d={};for(b in a){if(Ext.isObject(k._defaults[b])){d[b]={};Ext.apply(d[b],k._defaults[b])}else{d[b]=k._defaults[b]}}if(c){k._endStyle=d;k._anim=new Ext.fx.Anim({target:k,to:d,duration:150})}else{k.setAttributes(d,true)}delete k._highlighted}}},cleanHighlights:function(){if(!this.highlight){return}var d=this.group,c=this.markerGroup,b=0,a;for(a=d.getCount();b<a;b++){delete d.getAt(b)._defaults}if(c){for(a=c.getCount();b<a;b++){delete c.getAt(b)._defaults}}}});Ext.define("Ext.layout.Context",{requires:["Ext.util.Queue","Ext.layout.ContextItem","Ext.layout.Layout","Ext.fx.Anim","Ext.fx.Manager"],remainingLayouts:0,state:0,constructor:function(a){var b=this;Ext.apply(b,a);b.items={};b.layouts={};b.blockCount=0;b.cycleCount=0;b.flushCount=0;b.calcCount=0;b.animateQueue=b.newQueue();b.completionQueue=b.newQueue();b.finalizeQueue=b.newQueue();b.finishQueue=b.newQueue();b.flushQueue=b.newQueue();b.layoutQueue=b.newQueue();b.invalidQueue=[]},callLayout:function(b,a){this.currentLayout=b;var c=this.getCmp(b.owner);b[a](c)},cancelComponent:function(h,a){var n=this,g=h,j=!h.isComponent,b=j?g.length:1,d,c,m,l,e,q,o,p,r;for(d=0;d<b;++d){if(j){h=g[d]}if(!a){o=n.invalidQueue;m=o.length;if(m){n.invalidQueue=q=[];for(c=0;c<m;++c){p=o[c];r=p.item.target;if(r!=h&&!r.isDescendant(h)){q.push(p)}}}}e=h.componentLayout;n.cancelLayout(e);if(e.getLayoutItems){l=e.getLayoutItems();if(l.length){n.cancelComponent(l,true)}}if(h.isContainer&&!h.collapsed){e=h.layout;n.cancelLayout(e);l=e.getVisibleItems();if(l.length){n.cancelComponent(l,true)}}}},cancelLayout:function(b){var a=this;a.completionQueue.remove(b);a.finalizeQueue.remove(b);a.finishQueue.remove(b);a.layoutQueue.remove(b);if(b.running){a.layoutDone(b)}b.ownerContext=null},flush:function(){var d=this,a=d.flushQueue.clear(),c=a.length,b;if(c){++d.flushCount;for(b=0;b<c;++b){a[b].flush()}}},flushAnimations:function(){var d=this,b=d.animateQueue.clear(),a=b.length,c;if(a){for(c=0;c<a;c++){if(b[c].target.animate!==false){b[c].flushAnimations()}}Ext.fx.Manager.runner()}},flushInvalidates:function(){var j=this,h=j.invalidQueue,b=h&&h.length,g,e,l,k,c,a,m,d;j.invalidQueue=[];if(b){e=[];for(c=0;c<b;++c){g=(k=h[c]).item.target;if(!g.container.isDetachedBody){e.push(g);if(k.options){(d||(d=[])).push(k)}}}j.invalidate(e,null);if(d){b=d.length;for(c=0;c<b;++c){m=(k=d[c]).options;a=m.state;if(a){Ext.apply(k.item.state,a)}if(m.callback){l=j.currentLayout;j.currentLayout=m.layout||null;m.callback(m,k.item);j.currentLayout=l}}}}},flushLayouts:function(h,a,c){var g=this,j=c?g[h].items:g[h].clear(),e=j.length,b,d;if(e){for(b=0;b<e;++b){d=j[b];if(!d.running){g.callLayout(d,a)}}g.currentLayout=null}},getCmp:function(a){return this.getItem(a,a.el)},getEl:function(b,a){var c=this.getItem(a,a);if(!c.parent){c.parent=b;if(b.children.length){b.children.push(c)}else{b.children=[c]}}return c},getItem:function(d,b){var e=b.id,a=this.items,c=a[e]||(a[e]=new Ext.layout.ContextItem({context:this,target:d,el:b,ownerCtContext:this.ownerCtContext}));return c},handleFailure:function(){Ext.Object.each(this.layouts,function(b,a){a.running=false;a.ownerContext=null})},invalidate:function(m,o,j){var w=this,l=!m.isComponent,a=w.items,b=w.state>0,g,s,r,h,q,p,v,u,n,e,d,t,c;w.ownerCtContext=o;for(q=0,e=l?m.length:1;q<e;++q){v=l?m[q]:m;if(v.rendered&&!v.hidden){h=!v.componentLayout.ownerContext;u=w.getCmp(v);if(h){if(v.beforeLayout){v.beforeLayout()}if(b&&!o&&(r=v.ownerCt)){o=a[r.el.id]}u.init(o)}g=s=true;d=v.componentLayout;d.ownerContext=u;if(d.getLayoutItems){d.renderChildren();n=d.getLayoutItems();if(n.length){w.invalidate(n,u,true);g=false}}if(v.isContainer&&!v.collapsed){t=v.layout;t.ownerContext=u;t.renderChildren();n=t.getVisibleItems();if(n.length){w.invalidate(n,u,true);s=false}}else{t=null}if(!h){u.doInvalidate(j);n=u.children;for(p=n.length;p--;){n[p].doInvalidate(true)}}c=u.props;if(g){c.componentChildrenDone=true;if(s){c.childrenDone=true}}if(s){c.containerChildrenDone=true}w.resetLayout(d,u,h);if(t){w.resetLayout(t,u,h)}if(u.boxChildren&&u.widthModel.shrinkWrap){u.el.setWidth(10000);u.state.blocks=(u.state.blocks||0)+1}if(h){u.initAnimatePolicy()}}}},layoutDone:function(b){b.running=false;if(b.isComponentLayout){var c=b.ownerContext,a;if(c.measuresBox){c.onBoxMeasured()}c.setProp("done",true);a=c.ownerCtContext;if(a){if(c.target.ownerLayout.isComponentLayout){if(!--a.remainingComponentChildLayouts){a.setProp("componentChildrenDone",true)}}else{if(!--a.remainingContainerChildLayouts){a.setProp("containerChildrenDone",true)}}if(!--a.remainingChildLayouts){a.setProp("childrenDone",true)}}}--this.remainingLayouts;++this.progressCount},newQueue:function(){return new Ext.util.Queue()},queueAnimation:function(a){this.animateQueue.add(a)},queueCompletion:function(a){this.completionQueue.add(a)},queueFinalize:function(a){this.finalizeQueue.add(a)},queueFlush:function(a){this.flushQueue.add(a)},queueInvalidate:function(q,r){var l=this,n=[],m=l.invalidQueue,b=r||{},j=m.length,o=b.callback,p=b.scope,k=Ext.Function,h,c,g,i,a,d,e=b.state;if(q.isComponent){q=l.getCmp(h=q)}else{h=q.target}if(o&&p){b.callback=o=k.bind(o,p)}while(j--){c=m[j];i=c.item.target;if(h.isDescendant(i)){return}if(i==h){d=(a=c.options).state;if(d){Ext.apply(d,e)}else{a.state=e}if(o){if(!(g=a.callback)){a.callback=o}else{a.callback=k.createSequence(g,o)}}return}if(!i.isDescendant(h)){n.push(c)}}n.push({item:q,options:b});l.invalidQueue=n},queueItemLayouts:function(c){var a=c.isComponent?c:c.target,b=a.componentLayout;if(!b.pending&&!b.done){this.queueLayout(b)}b=a.layout;if(b&&!b.pending&&!b.done){this.queueLayout(b)}},queueLayout:function(a){this.layoutQueue.add(a);a.pending=true},resetLayout:function(c,d,e){var b=this,a;b.currentLayout=c;c.done=false;c.pending=true;c.firedTriggers=0;b.layoutQueue.add(c);if(e){b.layouts[c.id]=c;c.running=true;if(c.finishedLayout){b.finishQueue.add(c)}++b.remainingLayouts;++c.layoutCount;c.beginCount=0;c.blockCount=0;c.calcCount=0;c.triggerCount=0;if(c.isComponentLayout&&(a=d.ownerCtContext)){if(d.target.ownerLayout.isComponentLayout){++a.remainingComponentChildLayouts}else{++a.remainingContainerChildLayouts}++a.remainingChildLayouts}if(!c.initialized){c.initLayout()}c.beginLayout(d)}else{++c.beginCount;if(!c.running){++b.remainingLayouts;c.running=true;if(c.isComponentLayout){d.unsetProp("done");a=d.ownerCtContext;if(a){if(d.target.ownerLayout.isComponentLayout){if(++a.remainingComponentChildLayouts==1){a.unsetProp("componentChildrenDone")}}else{if(++a.remainingContainerChildLayouts==1){a.unsetProp("containerChildrenDone")}}if(++a.remainingChildLayouts==1){a.unsetProp("childrenDone")}}}b.completionQueue.remove(c);b.finalizeQueue.remove(c)}}c.beginLayoutCycle(d,e)},run:function(){var c=this,b=false,a=100;c.flushInvalidates();c.state=1;c.totalCount=c.layoutQueue.getCount();c.flush();while((c.remainingLayouts||c.invalidQueue.length)&&a--){if(c.invalidQueue.length){c.flushInvalidates()}if(c.runCycle()){b=false}else{if(!b){c.flush();b=true;c.flushLayouts("completionQueue","completeLayout")}else{c.state=2;break}}if(!(c.remainingLayouts||c.invalidQueue.length)){c.flush();c.flushLayouts("completionQueue","completeLayout");c.flushLayouts("finalizeQueue","finalizeLayout")}}return c.runComplete()},runComplete:function(){var a=this;a.state=2;if(a.remainingLayouts){a.handleFailure();return false}a.flush();a.flushLayouts("finishQueue","finishedLayout",true);a.flushLayouts("finishQueue","notifyOwner");a.flush();a.flushAnimations();return true},runCycle:function(){var c=this,d=c.layoutQueue.clear(),b=d.length,a;++c.cycleCount;c.progressCount=0;for(a=0;a<b;++a){c.runLayout(c.currentLayout=d[a])}c.currentLayout=null;return c.progressCount>0},runLayout:function(b){var a=this,c=a.getCmp(b.owner);b.pending=false;if(c.state.blocks){return}b.done=true;++b.calcCount;++a.calcCount;b.calculate(c);if(b.done){a.layoutDone(b);if(b.completeLayout){a.queueCompletion(b)}if(b.finalizeLayout){a.queueFinalize(b)}}else{if(!b.pending&&!(b.blockCount+b.triggerCount-b.firedTriggers)){a.queueLayout(b)}}},setItemSize:function(h,g,b){var d=h,a=1,c,e;if(h.isComposite){d=h.elements;a=d.length;h=d[0]}else{if(!h.dom&&!h.el){a=d.length;h=d[0]}}for(e=0;e<a;){c=this.get(h);c.setSize(g,b);h=d[++e]}}});Ext.define("Ext.selection.Model",{extend:"Ext.util.Observable",alternateClassName:"Ext.AbstractSelectionModel",requires:["Ext.data.StoreManager"],mixins:{bindable:"Ext.util.Bindable"},allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents("selectionchange","focuschange");b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=new Ext.util.MixedCollection();b.callParent(arguments)},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var a=this;return{add:a.onStoreAdd,clear:a.onStoreClear,remove:a.onStoreRemove,update:a.onStoreUpdate}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doSelect(d[c],true,b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},deselectAll:function(b){var e=this,d=e.getSelection(),c=0,a=d.length,g=e.getSelection().length;e.bulkChange=true;for(;c<a;c++){e.doDeselect(d[c],b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==g)},selectWithEvent:function(a,d,c){var b=this;switch(b.selectionMode){case"MULTI":if(d.ctrlKey&&b.isSelected(a)){b.doDeselect(a,false)}else{if(d.shiftKey&&b.lastFocused){b.selectRange(b.lastFocused,a,d.ctrlKey)}else{if(d.ctrlKey){b.doSelect(a,true,false)}else{if(b.isSelected(a)&&!d.shiftKey&&!d.ctrlKey&&b.selected.getCount()>1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case"SIMPLE":if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case"SINGLE":if(b.allowDeselect&&b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(l,e,m,c){var j=this,k=j.store,d=0,h,g,a,b=[];if(j.isLocked()){return}if(!m){j.deselectAll(true)}if(!Ext.isNumber(l)){l=k.indexOf(l)}if(!Ext.isNumber(e)){e=k.indexOf(e)}if(l>e){g=e;e=l;l=g}for(h=l;h<=e;h++){if(j.isSelected(k.getAt(h))){d++}}if(!c){a=-1}else{a=(c=="up")?l:e}for(h=l;h<=e;h++){if(d==(e-l+1)){if(h!=a){j.doDeselect(h,true)}}else{b.push(k.getAt(h))}}j.doMultiSelect(b,true)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked||!d.store){return}if(typeof c==="number"){c=[d.store.getAt(c)]}if(d.selectionMode=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,l,k){var h=this,b=h.selected,j=false,d=0,g,e;if(h.locked){return}a=!Ext.isArray(a)?[a]:a;g=a.length;if(!l&&b.getCount()>0){if(h.doDeselect(h.getSelection(),k)===false){return}}function c(){b.add(e);j=true}for(;d<g;d++){e=a[d];if(l&&h.isSelected(e)){continue}h.lastSelected=e;h.onSelectChange(e,true,k,c)}if(!h.preventFocus){h.setLastFocused(e,k)}h.maybeFireSelectionChange(j&&!k)},doDeselect:function(a,k){var j=this,b=j.selected,d=0,h,e,l=0,g=0;if(j.locked||!j.store){return false}if(typeof a==="number"){a=[j.store.getAt(a)]}else{if(!Ext.isArray(a)){a=[a]}}function c(){++g;b.remove(e)}h=a.length;for(;d<h;d++){e=a[d];if(j.isSelected(e)){if(j.lastSelected==e){j.lastSelected=b.last()}++l;j.onSelectChange(e,false,k,c)}}j.maybeFireSelectionChange(g>0&&!k);return g===l},doSingleSelect:function(a,b){var d=this,g=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()>0&&d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;g=true}d.onSelectChange(a,true,b,e);if(g){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;if(c!==a){d.onLastFocusChanged(a,c,b)}},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&&!b.bulkChange){b.fireEvent("selectionchange",b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():"SINGLE";this.selectionMode=this.modes[a]?a:"SINGLE"},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refresh:function(){var h=this,b=[],g=h.getSelection(),a=g.length,e,j,d=0,c=this.getLastFocused();for(;d<a;d++){e=g[d];if(!this.pruneRemoved||h.store.indexOf(e)!==-1){b.push(e)}}if(h.selected.getCount()!=b.length){j=true}h.clearSelections();if(h.store.indexOf(c)!==-1){this.setLastFocused(c,true)}if(b.length){h.doSelect(b,false,true)}h.maybeFireSelectionChange(j)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){if(this.selected.getCount>0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a){var d=this,c=d.selected;if(d.locked||!d.pruneRemoved){return}if(c.remove(a)){if(d.lastSelected==a){d.lastSelected=null}if(d.getLastFocused()==a){d.setLastFocused(null)}d.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(a,c,b){},onLastFocusChanged:function(b,a){this.fireEvent("focuschange",this,b,a)},onEditorKey:function(b,a){},bindComponent:function(a){}});Ext.define("Ext.selection.DataViewModel",{extend:"Ext.selection.Model",requires:["Ext.util.KeyNav"],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents("beforedeselect","beforeselect","deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bindStore(a.getStore());c[a.triggerEvent]=b.onItemClick;c[a.triggerCtEvent]=b.onContainerClick;a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,g){this.selectWithEvent(a,g)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on({render:Ext.Function.bind(b.initKeyNav,b,[a]),single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(g){g=g||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+g}else{a=0}if(a<0){a=c-1}else{if(a>=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,h){var g=this,a=g.view,c=e?"select":"deselect";if((d||g.fireEvent("before"+c,g,b))!==false&&h()!==false){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}if(!d){g.fireEvent(c,g,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define("Ext.Component",{alias:["widget.component","widget.box"],extend:"Ext.AbstractComponent",requires:["Ext.util.DelayedTask"],uses:["Ext.Layer","Ext.resizer.Resizer","Ext.util.ComponentDragger"],mixins:{floating:"Ext.util.Floating"},statics:{DIRECTION_TOP:"top",DIRECTION_RIGHT:"right",DIRECTION_BOTTOM:"bottom",DIRECTION_LEFT:"left",VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:"all",floating:false,toFrontOnShow:true,hideMode:"display",hideParent:false,bubbleEvents:[],actionMode:"el",monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);a.listeners=null}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var a=this;a.callParent();if(!(a.x&&a.y)&&(a.pageX||a.pageY)){a.setPagePosition(a.pageX,a.pageY)}if(a.resizable){a.initResizable(a.resizable)}if(a.draggable){a.initDraggable()}},setAutoScroll:function(a){var c=this,b,d;c.autoScroll=!!a;if(c.rendered){d=(b=c.getLayout&&c.getLayout())?b.getRenderTarget():c.getTargetEl();d.setStyle(c.getOverflowStyle())}return c},setOverflowXY:function(b,a){var d=this,c,e,g=arguments.length;if(g){d.overflowX=b||"";if(g>1){d.overflowY=a||""}}if(d.rendered){e=(c=d.getLayout&&d.getLayout())?c.getRenderTarget():d.getTargetEl();e.setStyle(d.getOverflowStyle())}return d},beforeRender:function(){var b=this,c=b.floating,a;if(c){b.addCls(Ext.baseCSSPrefix+"layer");a=c.cls;if(a){b.addCls(a)}}return b.callParent()},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},wrapPrimaryEl:function(a){if(this.floating){this.makeFloating(a)}else{this.callParent(arguments)}},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():null),handles:b.resizeHandles},a);a.target=b;b.resizer=new Ext.resizer.Resizer(a)},getDragEl:function(){return this.el},initDraggable:function(){var b=this,a=Ext.applyIf({el:b.getDragEl(),constrainTo:b.constrain?(b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.getScopeParent())):undefined},b.draggable);if(b.constrain||b.constrainDelegate){a.constrain=b.constrain;a.constrainDelegate=b.constrainDelegate}b.dd=new Ext.util.ComponentDragger(b,a)},scrollBy:function(b,a,c){var d;if((d=this.getTargetEl())&&d.dom){d.scrollBy.apply(d,arguments)}},setLoading:function(c,d){var b=this,a;if(b.rendered){Ext.destroy(b.loadMask);b.loadMask=null;if(c!==false&&!b.collapsed){if(Ext.isObject(c)){a=Ext.apply({},c)}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}if(d){Ext.applyIf(a,{useTargetEl:true})}b.loadMask=new Ext.LoadMask(b,a);b.loadMask.show()}}return b.loadMask},beforeSetPosition:function(){var b=this,c=b.callParent(arguments),a;if(c){a=b.adjustPosition(c.x,c.y);c.x=a.x;c.y=a.y}return c||null},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent("move",this,b,a)},showAt:function(a,d,b){var c=this;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender()}if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,g,b){var c=this,d,e;if(Ext.isArray(a)){g=a[1];a=a[0]}c.pageX=a;c.pageY=g;if(c.floating){if(c.isContainedFloater()){e=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&&Ext.isNumber(e.left)){a-=e.left}if(Ext.isNumber(g)&&Ext.isNumber(e.top)){g-=e.top}}c.setPosition(a,g,b)}else{d=c.el.translatePoints(a,g);c.setPosition(d.left,d.top,b)}return c},isContainedFloater:function(){return(this.floating&&this.floatParent)},getBox:function(b){var c=b?this.getPosition(b):this.el.getXY(),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin("lr"),height:a.getHeight()+a.getMargin("tb")}},adjustPosition:function(a,d){var b=this,c;if(b.isContainedFloater()){c=b.floatParent.getTargetEl().getViewRegion();a+=c.left;d+=c.top}return{x:a,y:d}},getPosition:function(a){var c=this,b=c.el,e,d=c.isContainedFloater(),g;if((a===true)||!d){return[b.getLeft(true),b.getTop(true)]}if(c.x!==undefined&&c.y!==undefined){e=[c.x,c.y]}else{e=c.el.getXY();if(d){g=c.floatParent.getTargetEl().getViewRegion();e[0]-=g.left;e[1]-=g.top}}return e},getId:function(){var a=this,b;if(!a.id){b=a.getXType();if(b){b=b.replace(Ext.Component.INVALID_ID_CHARS_Re,"-")}else{b=Ext.name.toLowerCase()+"-comp"}a.id=b+"-"+a.getAutoId()}return a.id},show:function(d,a,b){var c=this;if(c.rendered&&c.isVisible()){if(c.toFrontOnShow&&c.floating){c.toFront()}}else{if(c.fireEvent("beforeshow",c)!==false){c.hidden=false;if(!c.rendered&&(c.autoRender||c.floating)){c.doAutoRender()}if(c.rendered){c.beforeShow();c.onShow.apply(c,arguments);c.afterShow.apply(c,arguments)}}}return c},beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating&&a.constrain){a.doConstrain()}},afterShow:function(h,b,e){var g=this,a,c,d;h=h||g.animateTarget;if(!g.ghost){h=null}if(h){h=h.el?h.el:Ext.get(h);c=g.el.getBox();a=h.getBox();g.el.addCls(Ext.baseCSSPrefix+"hide-offsets");d=g.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;g.unghost();g.el.removeCls(Ext.baseCSSPrefix+"hide-offsets");g.onShowComplete(b,e)}}})}else{g.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront();c.onFloatShow()}Ext.callback(a,b||c);c.fireEvent("show",c);delete c.hiddenByLayout},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&&!a.isVisible())&&a.fireEvent("beforehide",a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments)}}return a},onHide:function(g,a,d){var e=this,c,b;g=g||e.animateTarget;if(!e.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=e.ghost();c.el.stopAnimation();b=g.getBox();b.width+="px";b.height+="px";c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!g){e.afterHide(a,d)}},afterHide:function(a,b){var c=this;delete c.hiddenByLayout;Ext.AbstractComponent.prototype.onHide.call(this);Ext.callback(a,b||c);c.fireEvent("hide",c)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer);if(a.actionMode=="container"||a.removeMode=="container"){a.container.remove()}}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c<a;++c){delete this[b[c]]}},focus:function(d,b){var c=this,a,e;if(c.rendered&&!c.isDestroyed&&(a=c.getFocusEl())){if(a.isComponent){return a.focus(d,b)}if(b){if(!c.focusTask){c.focusTask=new Ext.util.DelayedTask(c.focus)}c.focusTask.delay(Ext.isNumber(b)?b:10,null,c,[d,false]);return c}if((e=a.dom)){if(a.needsTabIndex()){e.tabIndex=-1}a.focus();if(d===true){e.select()}}if(c.floating){c.toFront(true)}}return c},blur:function(){var a;if(this.rendered&&(a=this.getFocusEl())){a.blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id(),a=Ext.applyIf(c,this.initialConfig),b;a.id=d;b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.ownerCt;b&&!a(b,this);b=b.ownerCt){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},getProxy:function(){var a=this,b;if(!a.proxy){b=Ext.getBody();if(Ext.scopeResetCSS){a.proxyWrap=b=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"reset"})}a.proxy=a.el.createProxy(Ext.baseCSSPrefix+"proxy-el",b,true)}return a.proxy}});Ext.define("Ext.app.EventBus",{requires:["Ext.util.Event","Ext.Component"],mixins:{observable:"Ext.util.Observable"},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var a=this;Ext.override(Ext.Component,{fireEvent:function(b){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return a.dispatch.call(a,b,this,arguments)}return false}})},dispatch:function(l,g,k){var h=this.bus,m=h[l],d,c,b,n,a,e,j;if(m){for(d in m){if(m.hasOwnProperty(d)&&g.is(d)){c=m[d];for(b in c){if(c.hasOwnProperty(b)){n=c[b];for(e=0,j=n.length;e<j;e++){a=n[e];if(a.fire.apply(a,Array.prototype.slice.call(k,1))===false){return false}}}}}}}return true},control:function(d,g,c){var b=this.bus,a,e;if(Ext.isString(d)){a=d;d={};d[a]=g;this.control(d,null,c);return}Ext.Object.each(d,function(h,i){Ext.Object.each(i,function(m,n){var j={},k=c,l=new Ext.util.Event(c,m);if(Ext.isObject(n)){j=n;n=j.fn;k=j.scope||c;delete j.fn;delete j.scope}l.addListener(n,k,j);b[m]=b[m]||{};b[m][h]=b[m][h]||{};b[m][h][c.id]=b[m][h][c.id]||[];b[m][h][c.id].push(l)})})}});Ext.define("Ext.chart.MaskLayer",{extend:"Ext.Component",constructor:function(a){a=Ext.apply(a||{},{style:"position:absolute;background-color:#888;cursor:move;opacity:0.6;border:1px solid #222;"});this.callParent([a])},initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave")},initDraggable:function(){this.callParent(arguments);this.dd.onStart=function(c){var b=this,a=b.comp;this.startPosition=a.getPosition(true);if(a.ghost&&!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}}}});Ext.define("Ext.chart.Mask",{requires:["Ext.chart.MaskLayer"],constructor:function(a){var b=this;b.addEvents("select");if(a){Ext.apply(b,a)}if(b.enableMask){b.on("afterrender",function(){var c=new Ext.chart.MaskLayer({renderTo:b.el,hidden:true});c.el.on({mousemove:function(g){b.onMouseMove(g)},mouseup:function(g){b.resized(g)}});var d=new Ext.resizer.Resizer({el:c.el,handles:"all",pinned:true});d.on({resize:function(g){b.resized(g)}});c.initDraggable();b.maskType=b.mask;b.mask=c;b.maskSprite=b.surface.add({type:"path",path:["M",0,0],zIndex:1001,opacity:0.7,hidden:true,stroke:"#444"})},b,{single:true})}},resized:function(d){var g=this,l=g.bbox||g.chartBBox,j=l.x,i=l.y,a=l.width,m=l.height,c=g.mask.getBox(true),h=Math.max,b=Math.min,n=c.x-j,k=c.y-i;n=h(n,j);k=h(k,i);n=b(n,a);k=b(k,m);c.x=n;c.y=k;g.fireEvent("select",g,c)},onMouseUp:function(c){var a=this,d=a.bbox||a.chartBBox,b=a.maskSelection;a.maskMouseDown=false;a.mouseDown=false;if(a.mouseMoved){a.onMouseMove(c);a.mouseMoved=false;a.fireEvent("select",a,{x:b.x-d.x,y:b.y-d.y,width:b.width,height:b.height})}},onMouseDown:function(b){var a=this;a.mouseDown=true;a.mouseMoved=false;a.maskMouseDown={x:b.getPageX()-a.el.getX(),y:b.getPageY()-a.el.getY()}},onMouseMove:function(t){var u=this,o=u.maskType,a=u.bbox||u.chartBBox,i=a.x,h=a.y,b=Math,q=b.floor,j=b.abs,n=b.min,p=b.max,k=q(h+a.height),m=q(i+a.width),d=t.getPageX(),c=t.getPageY(),s=d-u.el.getX(),r=c-u.el.getY(),g=u.maskMouseDown,l;u.mouseMoved=u.mouseDown;s=p(s,i);r=p(r,h);s=n(s,m);r=n(r,k);if(g&&u.mouseDown){if(o=="horizontal"){r=h;g.y=k;c=u.el.getY()+a.height+u.insetPadding}else{if(o=="vertical"){s=i;g.x=m}}m=g.x-s;k=g.y-r;l=["M",s,r,"l",m,0,0,k,-m,0,"z"];u.maskSelection={x:m>0?s:s+m,y:k>0?r:r+k,width:j(m),height:j(k)};u.mask.updateBox(u.maskSelection);u.mask.show();u.maskSprite.setAttributes({hidden:true},true)}else{if(o=="horizontal"){l=["M",s,h,"L",s,k]}else{if(o=="vertical"){l=["M",i,r,"L",m,r]}else{l=["M",s,h,"L",s,k,"M",i,r,"L",m,r]}}u.maskSprite.setAttributes({path:l,fill:u.maskMouseDown?u.maskSprite.stroke:false,"stroke-width":o===true?1:3,hidden:false},true)}},onMouseLeave:function(b){var a=this;a.mouseMoved=false;a.mouseDown=false;a.maskMouseDown=false;a.mask.hide();a.maskSprite.hide(true)}});Ext.define("Ext.draw.Component",{alias:"widget.draw",extend:"Ext.Component",requires:["Ext.draw.Surface","Ext.layout.component.Draw"],enginePriority:["Svg","Vml"],baseCls:Ext.baseCSSPrefix+"surface",componentLayout:"draw",viewBox:true,shrinkWrap:3,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents("mousedown","mouseup","mousemove","mouseenter","mouseleave","click")},onRender:function(){var d=this,j=d.viewBox,b=d.autoSize,h,c,a,i,g,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(j||b){h=c.getBBox();a=h.width;i=h.height;g=h.x;e=h.y;if(d.viewBox){d.surface.setViewBox(g,e,a,i)}else{d.autoSizeSurface()}}}},autoSizeSurface:function(){var d=this,b=d.surface.items,e=b.getBBox(),c=e.width,a=e.height;b.setAttributes({translate:{x:-e.x,y:-e.y+(+Ext.isOpera)}},true);d.surface.setSize(c,a);d.updateLayout()},createSurface:function(){var d=this,b=Ext.apply({},{width:d.width,height:d.height,renderTo:d.el},d.initialConfig),a;delete b.listeners;a=Ext.draw.Surface.create(b);if(!a){return false}d.surface=a;function c(e){return function(g){d.fireEvent(e,g)}}a.on({scope:d,mouseup:c("mouseup"),mousedown:c("mousedown"),mousemove:c("mousemove"),mouseenter:c("mouseenter"),mouseleave:c("mouseleave"),click:c("click")})},onDestroy:function(){Ext.destroy(this.surface);this.callParent(arguments)}});Ext.define("Ext.chart.Chart",{alias:"widget.chart",extend:"Ext.draw.Component",mixins:{themeManager:"Ext.chart.theme.Theme",mask:"Ext.chart.Mask",navigation:"Ext.chart.Navigation",bindable:"Ext.util.Bindable"},requires:["Ext.util.MixedCollection","Ext.data.StoreManager","Ext.chart.Legend","Ext.util.DelayedTask"],viewBox:false,animate:false,legend:false,insetPadding:10,enginePriority:["Svg","Vml"],background:false,constructor:function(b){var c=this,a;b=Ext.apply({},b);c.initTheme(b.theme||c.theme);if(c.gradients){Ext.apply(b,{gradients:c.gradients})}if(c.background){Ext.apply(b,{background:c.background})}if(b.animate){a={easing:"ease",duration:500};if(Ext.isObject(b.animate)){b.animate=Ext.applyIf(b.animate,a)}else{b.animate=a}}if(b.enableMask){c.mixins.mask.constructor.call(c,b)}c.mixins.navigation.constructor.call(c,b);c.callParent([b])},getChartStore:function(){return this.substore||this.store},initComponent:function(){var b=this,c,a;b.callParent();b.addEvents("itemmousedown","itemmouseup","itemmouseover","itemmouseout","itemclick","itemdoubleclick","itemdragstart","itemdrag","itemdragend","beforerefresh","refresh");Ext.applyIf(b,{zoom:{width:1,height:1,x:0,y:0}});b.maxGutter=[0,0];b.store=Ext.data.StoreManager.lookup(b.store);c=b.axes;b.axes=new Ext.util.MixedCollection(false,function(d){return d.position});if(c){b.axes.addAll(c)}a=b.series;b.series=new Ext.util.MixedCollection(false,function(d){return d.seriesId||(d.seriesId=Ext.id(null,"ext-chart-series-"))});if(a){b.series.addAll(a)}if(b.legend!==false){b.legend=new Ext.chart.Legend(Ext.applyIf({chart:b},b.legend))}b.on({mousemove:b.onMouseMove,mouseleave:b.onMouseLeave,mousedown:b.onMouseDown,mouseup:b.onMouseUp,scope:b})},afterComponentLayout:function(b,a){var c=this;if(Ext.isNumber(b)&&Ext.isNumber(a)){c.curWidth=b;c.curHeight=a;c.redraw(true)}this.callParent(arguments)},redraw:function(a){var d=this,c=d.chartBBox={x:0,y:0,height:d.curHeight,width:d.curWidth},b=d.legend;d.surface.setSize(c.width,c.height);d.series.each(d.initializeSeries,d);d.axes.each(d.initializeAxis,d);d.axes.each(function(e){e.processView()});d.axes.each(function(e){e.drawAxis(true)});if(b!==false){b.create()}d.alignAxes();if(d.legend!==false){b.updatePosition()}d.getMaxGutter();d.resizing=!!a;d.axes.each(d.drawAxis,d);d.series.each(d.drawCharts,d);d.resizing=false},afterRender:function(){var b,a=this;this.callParent();if(a.categoryNames){a.setCategoryNames(a.categoryNames)}if(a.tipRenderer){b=a.getFunctionRef(a.tipRenderer);a.setTipRenderer(b.fn,b.scope)}a.bindStore(a.store,true);a.refresh()},getEventXY:function(d){var c=this,b=this.surface.getRegion(),h=d.getXY(),a=h[0]-b.left,g=h[1]-b.top;return[a,g]},onClick:function(d){var c=this,a=c.getEventXY(d),b;c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemclick",b)}}}},c)},onMouseDown:function(d){var c=this,a=c.getEventXY(d),b;if(c.enableMask){c.mixins.mask.onMouseDown.call(c,d)}c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemmousedown",b)}}}},c)},onMouseUp:function(d){var c=this,a=c.getEventXY(d),b;if(c.enableMask){c.mixins.mask.onMouseUp.call(c,d)}c.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){b=e.getItemForPoint(a[0],a[1]);if(b){e.fireEvent("itemmouseup",b)}}}},c)},onMouseMove:function(i){var h=this,a=h.getEventXY(i),g,d,c,b;if(h.enableMask){h.mixins.mask.onMouseMove.call(h,i)}h.series.each(function(e){if(Ext.draw.Draw.withinBox(a[0],a[1],e.bbox)){if(e.getItemForPoint){g=e.getItemForPoint(a[0],a[1]);d=e._lastItemForPoint;c=e._lastStoreItem;b=e._lastStoreField;if(g!==d||g&&(g.storeItem!=c||g.storeField!=b)){if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}if(g){e.fireEvent("itemmouseover",g);e._lastItemForPoint=g;e._lastStoreItem=g.storeItem;e._lastStoreField=g.storeField}}}}else{d=e._lastItemForPoint;if(d){e.fireEvent("itemmouseout",d);delete e._lastItemForPoint;delete e._lastStoreField;delete e._lastStoreItem}}},h)},onMouseLeave:function(b){var a=this;if(a.enableMask){a.mixins.mask.onMouseLeave.call(a,b)}a.series.each(function(c){delete c._lastItemForPoint})},delayRefresh:function(){var a=this;if(!a.refreshTask){a.refreshTask=new Ext.util.DelayedTask(a.refresh,a)}a.refreshTask.delay(a.refreshBuffer)},refresh:function(){var a=this;if(a.rendered&&a.curWidth!==undefined&&a.curHeight!==undefined){if(a.fireEvent("beforerefresh",a)!==false){a.redraw();a.fireEvent("refresh",a)}}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);if(c.store&&!b){c.refresh()}},getStoreListeners:function(){var b=this.refresh,a=this.delayRefresh;return{refresh:b,add:a,remove:a,update:a,clear:b}},initializeAxis:function(b){var e=this,k=e.chartBBox,j=k.width,d=k.height,i=k.x,g=k.y,c=e.themeAttrs,a={chart:e};if(c){a.axisStyle=Ext.apply({},c.axis);a.axisLabelLeftStyle=Ext.apply({},c.axisLabelLeft);a.axisLabelRightStyle=Ext.apply({},c.axisLabelRight);a.axisLabelTopStyle=Ext.apply({},c.axisLabelTop);a.axisLabelBottomStyle=Ext.apply({},c.axisLabelBottom);a.axisTitleLeftStyle=Ext.apply({},c.axisTitleLeft);a.axisTitleRightStyle=Ext.apply({},c.axisTitleRight);a.axisTitleTopStyle=Ext.apply({},c.axisTitleTop);a.axisTitleBottomStyle=Ext.apply({},c.axisTitleBottom)}switch(b.position){case"top":Ext.apply(a,{length:j,width:d,x:i,y:g});break;case"bottom":Ext.apply(a,{length:j,width:d,x:i,y:d});break;case"left":Ext.apply(a,{length:d,width:j,x:i,y:d});break;case"right":Ext.apply(a,{length:d,width:j,x:j,y:d});break}if(!b.chart){Ext.apply(a,b);b=e.axes.replace(Ext.createByAlias("axis."+b.type.toLowerCase(),a))}else{Ext.apply(b,a)}},alignAxes:function(){var g=this,h=g.axes,e=g.legend,b=["top","right","bottom","left"],d,c=g.insetPadding,a={top:c,right:c,bottom:c,left:c};function i(k){var j=h.findIndex("position",k);return(j<0)?null:h.getAt(j)}Ext.each(b,function(k){var m=(k==="left"||k==="right"),j=i(k),l;if(e!==false){if(e.position===k){l=e.getBBox();a[k]+=(m?l.width:l.height)+a[k]}}if(j&&j.bbox){l=j.bbox;a[k]+=(m?l.width:l.height)}});d={x:a.left,y:a.top,width:g.curWidth-a.left-a.right,height:g.curHeight-a.top-a.bottom};g.chartBBox=d;h.each(function(j){var l=j.position,k=(l==="left"||l==="right");j.x=(l==="right"?d.x+d.width:d.x);j.y=(l==="top"?d.y:d.y+d.height);j.width=(k?d.width:d.height);j.length=(k?d.height:d.width)})},initializeSeries:function(h,k){var j=this,d=j.themeAttrs,c,e,n,p,o,m=[],g=0,b,a={chart:j,seriesId:h.seriesId};if(d){n=d.seriesThemes;o=d.markerThemes;c=Ext.apply({},d.series);e=Ext.apply({},d.marker);a.seriesStyle=Ext.apply(c,n[k%n.length]);a.seriesLabelStyle=Ext.apply({},d.seriesLabel);a.markerStyle=Ext.apply(e,o[k%o.length]);if(d.colors){a.colorArrayStyle=d.colors}else{m=[];for(b=n.length;g<b;g++){p=n[g];if(p.fill||p.stroke){m.push(p.fill||p.stroke)}}if(m.length){a.colorArrayStyle=m}}a.seriesIdx=k}if(h instanceof Ext.chart.series.Series){Ext.apply(h,a)}else{Ext.applyIf(a,h);h=j.series.replace(Ext.createByAlias("series."+h.type.toLowerCase(),a))}if(h.initialize){h.initialize()}},getMaxGutter:function(){var b=this,a=[0,0];b.series.each(function(c){var d=c.getGutters&&c.getGutters()||[0,0];a[0]=Math.max(a[0],d[0]);a[1]=Math.max(a[1],d[1])});b.maxGutter=a},drawAxis:function(a){a.drawAxis()},drawCharts:function(a){a.triggerafterrender=false;a.drawSeries();if(!this.animate){a.fireEvent("afterrender")}},save:function(a){return Ext.draw.Surface.save(a,this.surface)},destroy:function(){Ext.destroy(this.surface);this.bindStore(null);this.callParent(arguments)}});Ext.define("Ext.chart.TipSurface",{extend:"Ext.draw.Component",spriteArray:false,renderFirst:true,constructor:function(a){this.callParent([a]);if(a.sprites){this.spriteArray=[].concat(a.sprites);delete a.sprites}},onRender:function(){var c=this,b=0,a=0,d,e;this.callParent(arguments);e=c.spriteArray;if(c.renderFirst&&e){c.renderFirst=false;for(a=e.length;b<a;b++){d=c.surface.add(e[b]);d.setAttributes({hidden:false},true)}}}});Ext.define("Ext.chart.axis.Abstract",{requires:["Ext.chart.Chart"],constructor:function(a){a=a||{};var b=this,c=a.position||"left";c=c.charAt(0).toUpperCase()+c.substring(1);a.label=Ext.apply(a["axisLabel"+c+"Style"]||{},a.label||{});a.axisTitleStyle=Ext.apply(a["axisTitle"+c+"Style"]||{},a.labelTitle||{});Ext.apply(b,a);b.fields=[].concat(b.fields);this.callParent();b.labels=[];b.getId();b.labelGroup=b.chart.surface.getGroup(b.axisId+"-labels")},alignment:null,grid:false,steps:10,x:0,y:0,minValue:0,maxValue:0,getId:function(){return this.axisId||(this.axisId=Ext.id(null,"ext-axis-"))},processView:Ext.emptyFn,drawAxis:Ext.emptyFn,addDisplayAndLabels:Ext.emptyFn});Ext.define("Ext.chart.axis.Axis",{extend:"Ext.chart.axis.Abstract",alternateClassName:"Ext.chart.Axis",requires:["Ext.draw.Draw"],forceMinMax:false,dashSize:3,position:"bottom",skipFirst:false,length:0,width:0,majorTickSteps:false,applyData:Ext.emptyFn,getRange:function(){var s=this,d=s.chart.getChartStore(),k=s.fields,g=k.length,c=Math,u=c.max,r=c.min,j=false,n=isNaN(s.minimum)?Infinity:s.minimum,p=isNaN(s.maximum)?-Infinity:s.maximum,t=0,q,o,m,a,e,b=[],h=s.chart.series.items;for(q=0,o=h.length;!j&&q<o;q++){j=j||g>1&&h[q].stacked;b=h[q].__excludes||b}d.each(function(i){if(j){if(!isFinite(n)){n=0}for(a=[0,0],q=0;q<g;q++){if(b[q]){continue}e=i.get(k[q]);a[+(e>0)]+=c.abs(e)}p=u(p,-a[0],+a[1]);n=r(n,-a[0],+a[1])}else{for(q=0;q<g;q++){if(b[q]){continue}m=i.get(k[q]);p=u(p,+m);n=r(n,+m)}}});if(!isFinite(p)){p=s.prevMax||0}if(!isFinite(n)){n=s.prevMin||0}if(n!=p&&(p!=Math.floor(p))){p=Math.floor(p)+1}if(!isNaN(s.minimum)){n=s.minimum}if(!isNaN(s.maximum)){p=s.maximum}return{min:n,max:p}},calcEnds:function(){var i=this,b=i.fields,c=i.getRange(),h=c.min,a=c.max,e,g,d;d=Ext.draw.Draw.snapEnds(h,a,i.majorTickSteps!==false?(i.majorTickSteps+1):i.steps,(i.majorTickSteps===false));e=d.from;g=d.to;if(i.forceMinMax){if(!isNaN(a)){d.to=a}if(!isNaN(h)){d.from=h}}if(!isNaN(i.maximum)){d.to=i.maximum}if(!isNaN(i.minimum)){d.from=i.minimum}d.step=(d.to-d.from)/(g-e)*d.step;if(i.adjustMaximumByMajorUnit){d.to+=d.step}if(i.adjustMinimumByMajorUnit){d.from-=d.step}i.prevMin=h==a?0:h;i.prevMax=a;return d},drawAxis:function(u){var F=this,v,t,k=F.x,h=F.y,D=F.chart.maxGutter[0],C=F.chart.maxGutter[1],e=F.dashSize,B=F.minorTickSteps||0,A=F.minorTickSteps||0,b=F.length,G=F.position,g=[],n=false,c=F.applyData(),d=c.step,w=c.steps,s=c.from,a=c.to,z,r,q,p,o,m,l,E;if(F.hidden||isNaN(d)||(s==a)){return}F.from=c.from;F.to=c.to;if(G=="left"||G=="right"){r=Math.floor(k)+0.5;p=["M",r,h,"l",0,-b];z=b-(C*2)}else{q=Math.floor(h)+0.5;p=["M",k,q,"l",b,0];z=b-(D*2)}E=z/(w||1);m=Math.max(B+1,0);l=Math.max(A+1,0);if(F.type=="Numeric"||F.type=="Time"){n=true;F.labels=[c.from]}if(G=="right"||G=="left"){q=h-C;r=k-((G=="left")*e*2);while(q>=h-C-z){p.push("M",r,Math.floor(q)+0.5,"l",e*2+1,0);if(q!=h-C){for(v=1;v<l;v++){p.push("M",r+e,Math.floor(q+E*v/l)+0.5,"l",e+1,0)}}g.push([Math.floor(k),Math.floor(q)]);q-=E;if(n){F.labels.push(F.labels[F.labels.length-1]+d)}if(E===0){break}}if(Math.round(q+E-(h-C-z))){p.push("M",r,Math.floor(h-b+C)+0.5,"l",e*2+1,0);for(v=1;v<l;v++){p.push("M",r+e,Math.floor(h-b+C+E*v/l)+0.5,"l",e+1,0)}g.push([Math.floor(k),Math.floor(q)]);if(n){F.labels.push(F.labels[F.labels.length-1]+d)}}}else{r=k+D;q=h-((G=="top")*e*2);while(r<=k+D+z){p.push("M",Math.floor(r)+0.5,q,"l",0,e*2+1);if(r!=k+D){for(v=1;v<m;v++){p.push("M",Math.floor(r-E*v/m)+0.5,q,"l",0,e+1)}}g.push([Math.floor(r),Math.floor(h)]);r+=E;if(n){F.labels.push(F.labels[F.labels.length-1]+d)}if(E===0){break}}if(Math.round(r-E-(k+D+z))){p.push("M",Math.floor(k+b-D)+0.5,q,"l",0,e*2+1);for(v=1;v<m;v++){p.push("M",Math.floor(k+b-D-E*v/m)+0.5,q,"l",0,e+1)}g.push([Math.floor(r),Math.floor(h)]);if(n){F.labels.push(F.labels[F.labels.length-1]+d)}}}if(n){F.labels[g.length-1]=+(F.labels[g.length-1]).toFixed(10)}if(!F.axis){F.axis=F.chart.surface.add(Ext.apply({type:"path",path:p},F.axisStyle))}F.axis.setAttributes({path:p},true);F.inflections=g;if(!u&&F.grid){F.drawGrid()}F.axisBBox=F.axis.getBBox();F.drawLabel()},drawGrid:function(){var u=this,o=u.chart.surface,b=u.grid,d=b.odd,e=b.even,h=u.inflections,k=h.length-((d||e)?0:1),v=u.position,c=u.chart.maxGutter,n=u.width-2,s=false,p,q,r=1,m=[],g,a,j,l=[],t=[];if((c[1]!==0&&(v=="left"||v=="right"))||(c[0]!==0&&(v=="top"||v=="bottom"))){r=0;k++}for(;r<k;r++){p=h[r];q=h[r-1];if(d||e){m=(r%2)?l:t;g=((r%2)?d:e)||{};a=(g.lineWidth||g["stroke-width"]||0)/2;j=2*a;if(v=="left"){m.push("M",q[0]+1+a,q[1]+0.5-a,"L",q[0]+1+n-a,q[1]+0.5-a,"L",p[0]+1+n-a,p[1]+0.5+a,"L",p[0]+1+a,p[1]+0.5+a,"Z")}else{if(v=="right"){m.push("M",q[0]-a,q[1]+0.5-a,"L",q[0]-n+a,q[1]+0.5-a,"L",p[0]-n+a,p[1]+0.5+a,"L",p[0]-a,p[1]+0.5+a,"Z")}else{if(v=="top"){m.push("M",q[0]+0.5+a,q[1]+1+a,"L",q[0]+0.5+a,q[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+n-a,"L",p[0]+0.5-a,p[1]+1+a,"Z")}else{m.push("M",q[0]+0.5+a,q[1]-a,"L",q[0]+0.5+a,q[1]-n+a,"L",p[0]+0.5-a,p[1]-n+a,"L",p[0]+0.5-a,p[1]-a,"Z")}}}}else{if(v=="left"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",n,0])}else{if(v=="right"){m=m.concat(["M",p[0]-0.5,p[1]+0.5,"l",-n,0])}else{if(v=="top"){m=m.concat(["M",p[0]+0.5,p[1]+0.5,"l",0,n])}else{m=m.concat(["M",p[0]+0.5,p[1]-0.5,"l",0,-n])}}}}}if(d||e){if(l.length){if(!u.gridOdd&&l.length){u.gridOdd=o.add({type:"path",path:l})}u.gridOdd.setAttributes(Ext.apply({path:l,hidden:false},d||{}),true)}if(t.length){if(!u.gridEven){u.gridEven=o.add({type:"path",path:t})}u.gridEven.setAttributes(Ext.apply({path:t,hidden:false},e||{}),true)}}else{if(m.length){if(!u.gridLines){u.gridLines=u.chart.surface.add({type:"path",path:m,"stroke-width":u.lineWidth||1,stroke:u.gridColor||"#ccc"})}u.gridLines.setAttributes({hidden:false,path:m},true)}else{if(u.gridLines){u.gridLines.hide(true)}}}},getOrCreateLabel:function(c,g){var d=this,b=d.labelGroup,e=b.getAt(c),a=d.chart.surface;if(e){if(g!=e.attr.text){e.setAttributes(Ext.apply({text:g},d.label),true);e._bbox=e.getBBox()}}else{e=a.add(Ext.apply({group:b,type:"text",x:0,y:0,text:g},d.label));a.renderItem(e);e._bbox=e.getBBox()}if(d.label.rotation){e.setAttributes({rotation:{degrees:0}},true);e._ubbox=e.getBBox();e.setAttributes(d.label,true)}else{e._ubbox=e._bbox}return e},rect2pointArray:function(l){var b=this.chart.surface,g=b.getBBox(l,true),m=[g.x,g.y],d=m.slice(),k=[g.x+g.width,g.y],a=k.slice(),j=[g.x+g.width,g.y+g.height],e=j.slice(),i=[g.x,g.y+g.height],c=i.slice(),h=l.matrix;m[0]=h.x.apply(h,d);m[1]=h.y.apply(h,d);k[0]=h.x.apply(h,a);k[1]=h.y.apply(h,a);j[0]=h.x.apply(h,e);j[1]=h.y.apply(h,e);i[0]=h.x.apply(h,c);i[1]=h.y.apply(h,c);return[m,k,j,i]},intersect:function(c,a){var d=this.rect2pointArray(c),b=this.rect2pointArray(a);return !!Ext.draw.Draw.intersect(d,b).length},drawHorizontalLabels:function(){var F=this,c=F.label,A=Math.floor,w=Math.max,z=F.chart.axes,G=F.position,k=F.inflections,o=k.length,E=F.labels,r=F.labelGroup,s=0,g,C=F.chart.maxGutter[1],d,a,u,e,n,B=0,D,t,j,q,h,m,p,l,v,b;m=o-1;u=k[0];b=F.getOrCreateLabel(0,F.label.renderer(E[0]));g=Math.floor(Math.abs(Math.sin(c.rotate&&(c.rotate.degrees*Math.PI/180)||0)));for(v=0;v<o;v++){u=k[v];q=F.label.renderer(E[v]);D=F.getOrCreateLabel(v,q);a=D._bbox;s=w(s,a.height+F.dashSize+F.label.padding);p=A(u[0]-(g?a.height:a.width)/2);if(F.chart.maxGutter[0]==0){if(v==0&&z.findIndex("position","left")==-1){p=u[0]}else{if(v==m&&z.findIndex("position","right")==-1){p=u[0]-a.width}}}if(G=="top"){l=u[1]-(F.dashSize*2)-F.label.padding-(a.height/2)}else{l=u[1]+(F.dashSize*2)+F.label.padding+(a.height/2)}D.setAttributes({hidden:false,x:p,y:l},true);if(v!=0&&(F.intersect(D,n)||F.intersect(D,b))){D.hide(true);continue}n=D}return s},drawVerticalLabels:function(){var B=this,g=B.inflections,C=B.position,k=g.length,z=B.labels,u=0,r=Math.max,t=Math.floor,b=Math.ceil,s=B.chart.axes,v=B.chart.maxGutter[1],c,a,p,l,w=0,A,o,e,n,d,j,m,h,q;j=k;for(q=0;q<j;q++){p=g[q];n=B.label.renderer(z[q]);A=B.getOrCreateLabel(q,n);a=A._bbox;u=r(u,a.width+B.dashSize+B.label.padding);h=p[1];if(v<a.height/2){if(q==j-1&&s.findIndex("position","top")==-1){h=B.y-B.length+b(a.height/2)}else{if(q==0&&s.findIndex("position","bottom")==-1){h=B.y-t(a.height/2)}}}if(C=="left"){m=p[0]-a.width-B.dashSize-B.label.padding-2}else{m=p[0]+B.dashSize+B.label.padding+2}A.setAttributes(Ext.apply({hidden:false,x:m,y:h},B.label),true);if(q!=0&&B.intersect(A,l)){A.hide(true);continue}l=A}return u},drawLabel:function(){var h=this,a=h.position,b=h.labelGroup,j=h.inflections,g=0,e=0,d,c;if(a=="left"||a=="right"){g=h.drawVerticalLabels()}else{e=h.drawHorizontalLabels()}d=b.getCount();c=j.length;for(;c<d;c++){b.getAt(c).hide(true)}h.bbox={};Ext.apply(h.bbox,h.axisBBox);h.bbox.height=e;h.bbox.width=g;if(Ext.isString(h.title)){h.drawTitle(g,e)}},elipsis:function(d,h,c,e,b){var g,a;if(c<e){d.hide(true);return false}while(h.length>4){h=h.substr(0,h.length-4)+"...";d.setAttributes({text:h},true);g=d.getBBox();if(g.width<c){if(typeof b=="number"){d.setAttributes({x:Math.floor(b-(g.width/2))},true)}break}}return true},setTitle:function(a){this.title=a;this.drawLabel()},drawTitle:function(l,m){var h=this,g=h.position,b=h.chart.surface,c=h.displaySprite,k=h.title,e=(g=="left"||g=="right"),j=h.x,i=h.y,a,n,d;if(c){c.setAttributes({text:k},true)}else{a={type:"text",x:0,y:0,text:k};c=h.displaySprite=b.add(Ext.apply(a,h.axisTitleStyle,h.labelTitle));b.renderItem(c)}n=c.getBBox();d=h.dashSize+h.label.padding;if(e){i-=((h.length/2)-(n.height/2));if(g=="left"){j-=(l+d+(n.width/2))}else{j+=(l+d+n.width-(n.width/2))}h.bbox.width+=n.width+10}else{j+=(h.length/2)-(n.width*0.5);if(g=="top"){i-=(m+d+(n.height*0.3))}else{i+=(m+d+(n.height*0.8))}h.bbox.height+=n.height+10}c.setAttributes({translate:{x:j,y:i}},true)}});Ext.define("Ext.chart.axis.Category",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.CategoryAxis",alias:"axis.category",categoryNames:null,calculateCategoryCount:false,setLabels:function(){var b=this.chart.getChartStore(),a=this.fields,d=a.length,c;this.labels=[];b.each(function(e){for(c=0;c<d;c++){this.labels.push(e.get(a[c]))}},this)},applyData:function(){this.callParent();this.setLabels();var a=this.chart.getChartStore().getCount();return{from:0,to:a,power:1,step:1,steps:a-1}}});Ext.define("Ext.chart.axis.Gauge",{extend:"Ext.chart.axis.Abstract",position:"gauge",alias:"axis.gauge",drawAxis:function(q){var j=this.chart,a=j.surface,p=j.chartBBox,d=p.x+(p.width/2),b=p.y+p.height,c=this.margin||10,m=Math.min(p.width,2*p.height)/2+c,h=[],n,l=this.steps,e,g=Math.PI,o=Math.cos,k=Math.sin;if(this.sprites&&!j.resizing){this.drawLabel();return}if(this.margin>=0){if(!this.sprites){for(e=0;e<=l;e++){n=a.add({type:"path",path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"});n.setAttributes({hidden:false},true);h.push(n)}}else{h=this.sprites;for(e=0;e<=l;e++){h[e].setAttributes({path:["M",d+(m-c)*o(e/l*g-g),b+(m-c)*k(e/l*g-g),"L",d+m*o(e/l*g-g),b+m*k(e/l*g-g),"Z"],stroke:"#ccc"},true)}}}this.sprites=h;this.drawLabel();if(this.title){this.drawTitle()}},drawTitle:function(){var e=this,d=e.chart,a=d.surface,g=d.chartBBox,c=e.titleSprite,b;if(!c){e.titleSprite=c=a.add({type:"text",zIndex:2})}c.setAttributes(Ext.apply({text:e.title},e.label||{}),true);b=c.getBBox();c.setAttributes({x:g.x+(g.width/2)-(b.width/2),y:g.y+g.height-(b.height/2)-4},true)},setTitle:function(a){this.title=a;this.drawTitle()},drawLabel:function(){var k=this.chart,o=k.surface,b=k.chartBBox,j=b.x+(b.width/2),h=b.y+b.height,l=this.margin||10,d=Math.min(b.width,2*b.height)/2+2*l,t=Math.round,m=[],g,r=this.maximum||0,q=this.steps,p=0,u,s=Math.PI,c=Math.cos,a=Math.sin,e=this.label,n=e.renderer||function(i){return i};if(!this.labelArray){for(p=0;p<=q;p++){u=(p===0||p===q)?7:0;g=o.add({type:"text",text:n(t(p/q*r)),x:j+d*c(p/q*s-s),y:h+d*a(p/q*s-s)-u,"text-anchor":"middle","stroke-width":0.2,zIndex:10,stroke:"#333"});g.setAttributes({hidden:false},true);m.push(g)}}else{m=this.labelArray;for(p=0;p<=q;p++){u=(p===0||p===q)?7:0;m[p].setAttributes({text:n(t(p/q*r)),x:j+d*c(p/q*s-s),y:h+d*a(p/q*s-s)-u},true)}}this.labelArray=m}});Ext.define("Ext.chart.axis.Numeric",{extend:"Ext.chart.axis.Axis",alternateClassName:"Ext.chart.NumericAxis",type:"numeric",alias:"axis.numeric",constructor:function(c){var d=this,a=!!(c.label&&c.label.renderer),b;d.callParent([c]);b=d.label;if(d.roundToDecimal===false){return}if(c.constrain==null){d.constrain=(c.minimum!=null&&c.maximum!=null)}if(!a){b.renderer=function(e){return d.roundToDecimal(e,d.decimals)}}},roundToDecimal:function(a,c){var b=Math.pow(10,c||0);return Math.floor(a*b)/b},minimum:NaN,maximum:NaN,constrain:true,decimals:2,scale:"linear",doConstrain:function(){var k=this,o=k.chart.store,e=k.chart.series.items,h=k.fields,j=h.length,g=k.getRange(),b=g.min,m=g.max,d,a,p=[],q=false,n,c=[];for(d=0,a=e.length;d<a;d++){p[d]=e[d].__excludes;q=q||e[d].type==="area"}o.each(function(i){for(d=0;d<j;d++){if(p[d]){continue}n=i.get(h[d]);if(!q&&+n<+b){return}if(!q&&+n>+m){return}}c.push(i)});k.chart.substore=Ext.create("Ext.data.JsonStore",{model:o.model,data:c})},position:"left",adjustMaximumByMajorUnit:false,adjustMinimumByMajorUnit:false,processView:function(){var a=this,b=a.constrain;if(b){a.doConstrain()}},applyData:function(){this.callParent();return this.calcEnds()}});Ext.define("Ext.chart.axis.Radial",{extend:"Ext.chart.axis.Abstract",position:"radial",alias:"axis.radial",drawAxis:function(u){var m=this.chart,a=m.surface,t=m.chartBBox,q=m.store,b=q.getCount(),e=t.x+(t.width/2),c=t.y+(t.height/2),p=Math.min(t.width,t.height)/2,k=[],r,o=this.steps,g,d,h=Math.PI*2,s=Math.cos,n=Math.sin;if(this.sprites&&!m.resizing){this.drawLabel();return}if(!this.sprites){for(g=1;g<=o;g++){r=a.add({type:"circle",x:e,y:c,radius:Math.max(p*g/o,0),stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)}q.each(function(l,j){r=a.add({type:"path",path:["M",e,c,"L",e+p*s(j/b*h),c+p*n(j/b*h),"Z"],stroke:"#ccc"});r.setAttributes({hidden:false},true);k.push(r)})}else{k=this.sprites;for(g=0;g<o;g++){k[g].setAttributes({x:e,y:c,radius:Math.max(p*(g+1)/o,0),stroke:"#ccc"},true)}q.each(function(l,i){k[g+i].setAttributes({path:["M",e,c,"L",e+p*s(i/b*h),c+p*n(i/b*h),"Z"],stroke:"#ccc"},true)})}this.sprites=k;this.drawLabel()},drawLabel:function(){var r=this.chart,x=r.surface,b=r.chartBBox,h=r.store,m=b.x+(b.width/2),l=b.y+(b.height/2),e=Math.min(b.width,b.height)/2,B=Math.max,E=Math.round,s=[],k,v=[],c,w=[],g,t=!this.maximum,D=this.maximum||0,C=this.steps,A=0,z,p,o,u=Math.PI*2,d=Math.cos,a=Math.sin,y=this.label.display,n=y!=="none",q=10;if(!n){return}r.series.each(function(i){v.push(i.yField);g=i.xField});h.each(function(j,F){if(t){for(F=0,c=v.length;F<c;F++){D=B(+j.get(v[F]),D)}}w.push(j.get(g))});if(!this.labelArray){if(y!="categories"){for(A=1;A<=C;A++){k=x.add({type:"text",text:E(A/C*D),x:m,y:l-e*A/C,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"});k.setAttributes({hidden:false},true);s.push(k)}}if(y!="scale"){for(z=0,C=w.length;z<C;z++){p=d(z/C*u)*(e+q);o=a(z/C*u)*(e+q);k=x.add({type:"text",text:w[z],x:m+p,y:l+o,"text-anchor":p*p<=0.001?"middle":(p<0?"end":"start")});k.setAttributes({hidden:false},true);s.push(k)}}}else{s=this.labelArray;if(y!="categories"){for(A=0;A<C;A++){s[A].setAttributes({text:E((A+1)/C*D),x:m,y:l-e*(A+1)/C,"text-anchor":"middle","stroke-width":0.1,stroke:"#333"},true)}}if(y!="scale"){for(z=0,C=w.length;z<C;z++){p=d(z/C*u)*(e+q);o=a(z/C*u)*(e+q);if(s[A+z]){s[A+z].setAttributes({type:"text",text:w[z],x:m+p,y:l+o,"text-anchor":p*p<=0.001?"middle":(p<0?"end":"start")},true)}}}}this.labelArray=s}});Ext.define("Ext.chart.axis.Time",{extend:"Ext.chart.axis.Numeric",alternateClassName:"Ext.chart.TimeAxis",alias:"axis.time",requires:["Ext.data.Store","Ext.data.JsonStore"],dateFormat:false,fromDate:false,toDate:false,step:[Ext.Date.DAY,1],constrain:false,roundToDecimal:false,constructor:function(b){var c=this,a,d,e;c.callParent([b]);a=c.label||{};e=this.dateFormat;if(e){if(a.renderer){d=a.renderer;a.renderer=function(g){g=d(g);return Ext.Date.format(new Date(d(g)),e)}}else{a.renderer=function(g){return Ext.Date.format(new Date(g>>0),e)}}}},doConstrain:function(){var s=this,d=s.chart.store,t=[],h=s.chart.series.items,c=Math,u=c.max,r=c.min,k=s.fields,g=k.length,j=s.getRange(),n=j.min,p=j.max,q,o,b=[],m,a,e,t=[];for(q=0,o=h.length;q<o;q++){b[q]=h[q].__excludes}d.each(function(i){for(q=0;q<g;q++){if(b[q]){continue}m=i.get(k[q]);if(+m<+n){return}if(+m>+p){return}}t.push(i)});s.chart.substore=Ext.create("Ext.data.JsonStore",{model:d.model,data:t})},processView:function(){var a=this;if(a.fromDate){a.minimum=+a.fromDate}if(a.toDate){a.maximum=+a.toDate}if(a.constrain){a.doConstrain()}},calcEnds:function(){var c=this,a,b=c.step;if(b){a=c.getRange();a=Ext.draw.Draw.snapEndsByDateAndStep(new Date(a.min),new Date(a.max),Ext.isNumber(b)?[Date.MILLI,b]:b);if(c.minimum){a.from=c.minimum}if(c.maximum){a.to=c.maximum}a.step=(a.to-a.from)/a.steps;return a}else{return c.callParent(arguments)}}});Ext.define("Ext.draw.Text",{extend:"Ext.draw.Component",uses:["Ext.util.CSS"],alias:"widget.text",text:"",focusable:false,viewBox:false,autoSize:true,baseCls:Ext.baseCSSPrefix+"surface "+Ext.baseCSSPrefix+"draw-text",initComponent:function(){var a=this;a.textConfig=Ext.apply({type:"text",text:a.text,rotate:{degrees:a.degrees||0}},a.textStyle);Ext.apply(a.textConfig,a.getStyles(a.styleSelectors||a.styleSelector));a.initialConfig.items=[a.textConfig];a.callParent(arguments)},getStyles:function(d){d=Ext.Array.from(d);var c,b=d.length,g,e,h,a={};for(c=0;c<b;c++){g=Ext.util.CSS.getRule(d[c]);if(g){e=g.style;if(e){Ext.apply(a,{"font-family":e.fontFamily,"font-weight":e.fontWeight,"line-height":e.lineHeight,"font-size":e.fontSize,fill:e.color})}}}return a},setAngle:function(d){var c=this;if(c.rendered){var a=c.surface,b=a.items.items[0];c.degrees=d;b.setAttributes({rotate:{degrees:d}},true);c.autoSizeSurface()}else{c.degrees=d}},setText:function(d){var c=this;if(c.rendered){var a=c.surface,b=a.items.items[0];c.text=d||"";a.remove(b);c.textConfig.type="text";c.textConfig.text=c.text;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:c.degrees}},true);c.autoSizeSurface()}else{c.on({render:function(){c.setText(d)},single:true})}}});Ext.define("Ext.Img",{extend:"Ext.Component",alias:["widget.image","widget.imagecomponent"],autoEl:"img",src:"",alt:"",getElConfig:function(){return Ext.apply(this.callParent(),{src:this.src,alt:this.alt})},initRenderTpl:Ext.emptyFn,setSrc:function(c){var b=this,a=b.el;b.src=c;if(a){a.dom.src=c}}});Ext.define("Ext.LoadMask",{extend:"Ext.Component",alias:"widget.loadmask",mixins:{floating:"Ext.util.Floating",bindable:"Ext.util.Bindable"},uses:["Ext.data.StoreManager"],msg:"Loading...",msgCls:Ext.baseCSSPrefix+"mask-loading",maskCls:Ext.baseCSSPrefix+"mask",useMsg:true,useTargetEl:false,baseCls:Ext.baseCSSPrefix+"mask-msg",childEls:["msgEl"],renderTpl:'<div id="{id}-msgEl" style="position:relative" class="{[values.$comp.msgCls]}"></div>',floating:{shadow:"frame"},focusOnToFront:false,registerWithManager:false,defaultZIndex:100,constructor:function(a,b){var c=this;c.ownerCt=a;c.bindComponent(a);c.callParent([b]);if(c.store){c.bindStore(c.store,true)}},bindComponent:function(a){var c=this,b={scope:this,hide:c.onComponentHide,show:c.onComponentShow,resize:c.sizeMask,added:c.onComponentAdded,removed:c.onComponentRemoved};if(a.floating){b.move=c.sizeMask}else{if(a.ownerCt){c.onComponentAdded(a.ownerCt)}}c.mon(a,b);Ext.container.Container.onContainerHide(c.onContainerHide,c);Ext.container.Container.onContainerShow(c.onContainerShow,c)},onComponentAdded:function(a){var b=this;delete b.activeOwner;b.floatParent=a;if(!a.floating){a=a.up("[floating]")}if(a){b.activeOwner=a;b.mon(a,"move",b.sizeMask,b)}a=b.floatParent.ownerCt;if(b.rendered&&b.isVisible()&&a){b.floatOwner=a;b.mon(a,"afterlayout",b.setupMask,b,{single:true})}},onComponentRemoved:function(a){var c=this,d=c.activeOwner,b=c.floatOwner;if(d){c.mun(d,"move",c.sizeMask,c)}if(b){c.mun(b,"afterlayout",c.setupMask,c)}delete c.activeOwner;delete c.floatOwner},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onContainerShow:function(a){if(this.isActiveContainer(a)){this.onComponentShow()}},onContainerHide:function(a){if(this.isActiveContainer(a)){this.onComponentHide()}},isActiveContainer:function(b){var a=this.getOwner();return a.isDescendantOf(b)},onComponentHide:function(){var a=this;if(a.rendered&&a.isVisible()){a.hide();a.showNext=true}},onComponentShow:function(){if(this.showNext){this.show()}delete this.showNext},sizeMask:function(){var a=this,b;if(a.rendered&&a.isVisible()){a.center();b=a.getMaskTarget();a.getMaskEl().show().setSize(b.getSize()).alignTo(b,"tl-tl")}},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);a=c.store;if(a&&a.isLoading()){c.onBeforeLoad()}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onLoad}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},getOwner:function(){return this.ownerCt||this.floatParent},getMaskTarget:function(){var a=this.getOwner();return this.useTargetEl?a.getTargetEl():a.getEl()},onBeforeLoad:function(){var c=this,a=c.getOwner(),b;if(!c.disabled){c.loading=true;if(a.componentLayoutCounter){c.maybeShow()}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);c.maybeShow()}}}},maybeShow:function(){var b=this,a=b.getOwner();if(b.loading&&a.rendered&&a.isVisible(true)){b.show()}},getMaskEl:function(){var a=this;if(!a.maskEl){a.maskEl=Ext.getBody().createChild({cls:a.maskCls})}return a.maskEl},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},hide:function(){delete this.showNext;return this.callParent(arguments)},onHide:function(){this.callParent();this.getMaskEl().hide()},show:function(){return this.callParent(arguments)},afterShow:function(){this.callParent(arguments);this.setupMask()},setupMask:function(){this.sizeMask();this.setupZIndexes()},toFront:Ext.emptyFn,setZIndex:function(a){if(this.rendered){this.getMaskEl().setStyle("z-index",++a);this.el.setStyle("z-index",++a)}return a},onZIndexChange:function(a){this.setZIndex(a)},setupZIndexes:function(){var b=this,c=b.activeOwner,a=b.getOwner(),d;if(!c&&a&&a.floating){c=a}if(c){d=c.getEl().getZIndex();if(isNaN(d)){d=b.defaultZIndex}}else{d=b.defaultZIndex}b.setZIndex(d)},onLoad:function(){this.loading=false;this.hide()},onDestroy:function(){var a=this;Ext.destroy(a.maskEl);Ext.container.Container.removeHideListener(a.onContainerHide,a);Ext.container.Container.removeShowListener(a.onContainerShow,a);a.callParent()}});Ext.define("Ext.view.AbstractView",{extend:"Ext.Component",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.CompositeElementLite","Ext.DomQuery","Ext.selection.DataViewModel"],mixins:{bindable:"Ext.util.Bindable"},inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+"dataview-item",loadingText:"Loading...",loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+"item-selected",emptyText:"",deferEmptyText:true,trackOver:false,blockRefresh:false,preserveScrollOnRefresh:false,last:false,triggerEvent:"itemclick",triggerCtEvent:"containerclick",addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join("")}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector="."+c.itemCls}d=Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>',c.itemCls,d);c.tpl=new Ext.XTemplate(d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=new Ext.XTemplate(c.tpl)}c.addEvents("beforerefresh","refresh","viewready","itemupdate","itemadd","itemremove");c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||"ext-empty-store");c.all=new Ext.CompositeElementLite();c.scrollState={top:0,left:0};c.on({scroll:c.onViewScroll,element:"el",scope:c})},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=new Ext.LoadMask(c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},onMaskBeforeShow:function(){var b=this,a=b.loadingHeight;b.getSelectionModel().deselectAll();b.all.clear();if(a&&a>b.getHeight()){b.isLoadingHeight=true;b.bufferHeight=b.height;b.setHeight(a)}},onMaskHide:function(){var a=this;if(!a.destroying&&a.loadingHeight&&a.isLoadingHeight){if(a.bufferHeight){a.setHeight(a.bufferHeight)}else{delete a.height;a.updateLayout()}delete a.isLoadingHeight}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b="SINGLE";if(!a.selModel){a.selModel={}}if(a.simpleSelect){b="SIMPLE"}else{if(a.multiSelect){b="MULTI"}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=new Ext.selection.DataViewModel(a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect","focuschange"]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,d,b,a;if(!c.rendered||c.isDestroyed){return}c.fireEvent("beforerefresh",c);d=c.getTargetEl();a=c.store.getRange();if(!c.preserveScrollOnRefresh){b=d.dom.parentNode;d.dom.style.display="none";b.removeChild(d.dom)}if(c.refreshCounter){c.clearViewEl()}else{c.fixedNodes=d.dom.childNodes.length;c.refreshCounter=1}c.tpl.append(d,c.collectData(a,0));if(a.length<1){if(!c.deferEmptyText||c.hasSkippedEmptyText){Ext.core.DomHelper.insertHtml("beforeEnd",d.dom,c.emptyText)}c.all.clear()}else{c.all.fill(Ext.query(c.getItemSelector(),d.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;if(!c.preserveScrollOnRefresh){b.appendChild(d.dom);d.dom.style.display=""}c.fireEvent("refresh",c);if(!c.viewReady){c.viewReady=true;c.fireEvent("viewready",c)}},clearViewEl:function(){var b=this,a=b.getTargetEl();if(b.fixedNodes){while(a.dom.childNodes[b.fixedNodes]){a.dom.removeChild(a.dom.childNodes[b.fixedNodes])}}else{a.update("")}b.refreshCounter++},onViewScroll:Ext.emptyFn,saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;b.scrollLeft=a.left;b.scrollTop=a.top}},prepareData:function(e,d,c){var b,a;if(c){b=c.getAssociatedData();for(a in b){if(b.hasOwnProperty(a)){e[a]=b[a]}}}return e},collectData:function(c,g){var e=[],d=0,a=c.length,b;for(;d<a;d++){b=c[d];e[d]=this.prepareData(b.getData(),g+d,b)}return e},bufferRender:function(a,b){var c=this,d=c.renderBuffer||(c.renderBuffer=document.createElement("div"));c.tpl.overwrite(d,c.collectData(a,b));return Ext.query(c.getItemSelector(),d)},onUpdate:function(e,a){var d=this,b=d.store.indexOf(a),c;if(b>-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();d.fireEvent("itemupdate",a,b,c);return c}}},onAdd:function(e,b,c){var d=this,a;if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.fireEvent("itemadd",b,c,a)},doAdd:function(b,a,c){var e=this.all,g=e.getCount(),d;if(g===0){this.clearViewEl();this.getTargetEl().appendChild(b)}else{if(c<g){e.item(c).insertSibling(b,"before",true)}else{e.last().insertSibling(b,"after",true)}}Ext.Array.insert(e.elements,c,b)},onRemove:function(d,a,b){var c=this;c.doRemove(a,b);c.updateIndexes(b);if(c.store.getCount()===0){c.refresh()}c.fireEvent("itemremove",a,b)},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(e,d){var c=this.all.elements,a=this.store.getRange(),b;e=e||0;d=d||((d===0)?0:(c.length-1));for(b=e;b<=d;b++){c[b].viewIndex=b;c[b].viewRecordId=a[b].internalId;if(!c[b].boundView){c[b].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b){var c=this;c.mixins.bindable.bindStore.apply(c,arguments);c.getSelectionModel().bindStore(c.store);if(a){if(b&&c.deferInitialRefresh){Ext.Function.defer(function(){if(!c.isDestroyed){c.refresh(true)}},1)}else{c.refresh(true)}}},onUnbindStore:function(a){this.setMaskBind(null)},onBindStore:function(a){this.setMaskBind(a)},setMaskBind:function(b){var a=this.loadMask;if(a&&a.bindStore){a.bindStore(b)}},getStoreListeners:function(){var a=this;return{refresh:a.onDataRefresh,add:a.onAdd,remove:a.onRemove,update:a.onUpdate,clear:a.refresh}},onDataRefresh:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c<d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.store.data;for(;d<a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.store.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if(!this.rendered){return null}if(Ext.isString(a)){return document.getElementById(a)}if(Ext.isNumber(a)){return this.all.elements[a]}if(a instanceof Ext.data.Model){return this.getNodeByRecord(a)}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b<d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(e,a){var d=this.all.elements,b=[],c;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate("extjs","4.0",function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel")}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()")}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()")}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define("Ext.Shadow",{requires:["Ext.ShadowPool"],constructor:function(b){var c=this,d={h:0},e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case"drop":if(Ext.supports.CSS3BoxShadow){d.w=d.h=-e;d.l=d.t=e}else{d.w=0;d.l=d.t=e;d.t-=1;if(Ext.isIE){d.l-=e+a;d.t-=e+a;d.w-=a;d.h-=a;d.t+=1}}break;case"sides":if(Ext.supports.CSS3BoxShadow){d.h-=e;d.t=e;d.l=d.w=0}else{d.w=(e*2);d.l=-e;d.t=e-1;if(Ext.isIE){d.l-=(e-a);d.t-=e+a;d.l+=1;d.w-=(e-a)*2;d.w-=a+1;d.h-=1}}break;case"frame":if(Ext.supports.CSS3BoxShadow){d.l=d.w=d.t=0}else{d.w=d.h=(e*2);d.l=d.t=-e;d.t+=1;d.h-=2;if(Ext.isIE){d.l-=(e-a);d.t-=(e-a);d.l+=1;d.w-=(e+a+1);d.h-=(e+a);d.h+=1}break}}c.adjusts=d},offset:4,defaultMode:"drop",show:function(c){var b=this,a;c=Ext.get(c);if(!b.el){b.el=Ext.ShadowPool.pull();if(b.el.dom.nextSibling!=c.dom){b.el.insertBefore(c)}}a=(parseInt(c.getStyle("z-index"),10)-1)||0;b.el.setStyle("z-index",b.zIndex||a);if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity="+b.opacity+") progid:DXImageTransform.Microsoft.Blur(pixelradius="+(b.offset)+")"}b.realign(c.getLeft(true),c.getTop(true),c.dom.offsetWidth,c.dom.offsetHeight);b.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,p,m,h){if(!this.el){return}var a=this.adjusts,j=this.el.dom,k=j.style,c,g,n,e,i,o;k.left=(b+a.l)+"px";k.top=(p+a.t)+"px";c=Math.max(m+a.w,0);g=Math.max(h+a.h,0);i=c+"px";o=g+"px";if(k.width!=i||k.height!=o){k.width=i;k.height=o;if(Ext.supports.CSS3BoxShadow){k.boxShadow="0 0 "+this.offset+"px 0 #888"}else{if(!Ext.isIE){n=j.childNodes;e=Math.max(0,(c-12))+"px";n[0].childNodes[1].style.width=e;n[1].childNodes[1].style.width=e;n[2].childNodes[1].style.width=e;n[1].style.height=Math.max(0,(g-12))+"px"}}}},hide:function(){var a=this;if(a.el){a.el.dom.style.display="none";Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&&!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define("Ext.dd.DragDrop",{requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(i,g,n){if(Ext.isNumber(g)){g={left:g,right:g,top:g,bottom:g}}g=g||this.defaultPadding;var k=Ext.get(this.getEl()).getBox(),a=Ext.get(i),m=a.getScroll(),j,d=a.dom;if(d==document.body){j={x:m.left,y:m.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{var l=a.getXY();j={x:l[0],y:l[1],width:d.clientWidth,height:d.clientHeight}}var h=k.y-j.y,e=k.x-j.x;this.resetConstraints();this.setXConstraint(e-(g.left||0),j.width-e-k.width-(g.right||0),this.xTickSize);this.setYConstraint(h-(g.top||0),j.height-h-k.height-(g.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!=="string"){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:"default");this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&&0!==a){this.padding=[c,c,c,c]}else{if(!d&&0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl();if(!this.DDMInstance.verifyEl(e)){return}var b=d||0;var a=c||0;var g=Ext.Element.getXY(e);this.initPageX=g[0]-b;this.initPageY=g[1]-a;this.lastPageX=g[0];this.lastPageY=g[1];this.setStartPosition(g)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!=="string"){a=Ext.id(a)}Ext.EventManager.on(a,"mousedown",this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,"mousedown",this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,b){if(this.primaryButtonOnly&&c.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);var a=c.getPoint();if(!this.hasOuterHandles&&!this.DDMInstance.isOverTarget(a,this)){}else{if(this.clickValidator(c)){this.setStartPosition();this.b4MouseDown(c);this.onMouseDown(c);this.DDMInstance.handleMouseDown(c,this);this.DDMInstance.stopEvent(c)}else{}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&&(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!=="string"){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c<a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true;var h;try{h=d.nodeName.toUpperCase()}catch(g){h=d.nodeName}c=c&&!this.invalidHandleTypes[h];c=c&&!this.invalidHandleIds[d.id];for(var b=0,a=this.invalidHandleClasses.length;c&&b<a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={};for(var b=this.initPageX;b>=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b<=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={};for(var b=this.initPageY;b>=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b<=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(h,d){if(!d){return h}else{if(d[0]>=h){return d[0]}else{for(var b=0,a=d.length;b<a;++b){var c=b+1;if(d[c]&&d[c]>=h){var g=h-d[b];var e=d[c]-h;return(e>g)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return("DragDrop "+this.id)}});Ext.define("Ext.dd.DD",{extend:"Ext.dd.DragDrop",requires:["Ext.dd.DragDropManager"],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var g=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,"_dd"),l=d.getSize(),i=Ext.Element,j;if(!this.deltaSetXY){j=this.cachedViewportSize={width:i.getDocumentWidth(),height:i.getDocumentHeight()};var a=[Math.max(0,Math.min(g.x,j.width-l.width)),Math.max(0,Math.min(g.y,j.height-l.height))];d.setXY(a);var k=d.getLeft(true);var h=d.getTop(true);this.deltaSetXY=[k-g.x,h-g.y]}else{j=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(g.x+this.deltaSetXY[0],j.width-l.width)),Math.max(0,Math.min(g.y+this.deltaSetXY[1],j.height-l.height)))}this.cachePosition(g.x,g.y);this.autoScroll(g.x,g.y,b.offsetHeight,b.offsetWidth);return g},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.Element.getViewHeight();var b=Ext.Element.getViewWidth();var p=this.DDMInstance.getScrollTop();var d=this.DDMInstance.getScrollLeft();var j=e+k;var o=m+l;var i=(n+p-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i<c){window.scrollTo(d,p+a)}if(k<p&&p>0&&k-p<c){window.scrollTo(d,p-a)}if(o>b&&g<c){window.scrollTo(d+a,p)}if(l<d&&d>0&&l-d<c){window.scrollTo(d-a,p)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a<this.minX){a=this.minX}if(a>this.maxX){a=this.maxX}}if(this.constrainY){if(d<this.minY){d=this.minY}if(d>this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.define("Ext.dd.DDProxy",{extend:"Ext.dd.DD",statics:{dragElId:"ygddfdiv"},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.define("Ext.dd.DDTarget",{extend:"Ext.dd.DragDrop",constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.define("Ext.dd.DropTarget",{extend:"Ext.dd.DDTarget",requires:["Ext.dd.ScrollManager"],constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.dd.DropZone",{extend:"Ext.dd.DropTarget",requires:["Ext.dd.Registry"],getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define("Ext.dd.StatusProxy",{extend:"Ext.Component",animRepair:false,childEls:["ghost"],renderTpl:['<div class="'+Ext.baseCSSPrefix+'dd-drop-icon"></div><div id="{id}-ghost" class="'+Ext.baseCSSPrefix+'dd-drag-ghost"></div>'],constructor:function(a){var b=this;Ext.apply(b,{hideMode:"visibility",hidden:true,floating:true,id:b.id||Ext.id(),cls:Ext.baseCSSPrefix+"dd-drag-proxy "+this.dropNotAllowed,shadow:!a||a.shadow!==false,renderTo:Ext.getDetachedBody()});b.callParent(arguments);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(b){var c=this,a=Ext.baseCSSPrefix+"dd-drag-proxy ";c.el.replaceCls(a+c.dropAllowed,a+c.dropNotAllowed);c.dropStatus=c.dropNotAllowed;if(b){c.ghost.update("")}},update:function(a){if(typeof a=="string"){this.ghost.update(a)}else{this.ghost.update("");a.style.margin="0";this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle("float","none")}},getGhost:function(){return this.ghost},hide:function(a){this.callParent();if(a){this.reset(true)}},stop:function(){if(this.anim&&this.anim.isAnimated&&this.anim.isAnimated()){this.anim.stop()}},sync:function(){this.el.sync()},repair:function(c,d,a){var b=this;b.callback=d;b.scope=a;if(c&&b.animRepair!==false){b.el.addCls(Ext.baseCSSPrefix+"dd-drag-repair");b.el.hideUnders(true);b.anim=b.el.animate({duration:b.repairDuration||500,easing:"ease-out",to:{x:c[0],y:c[1]},stopAnimation:true,callback:b.afterRepair,scope:b})}else{b.afterRepair()}},afterRepair:function(){var a=this;a.hide(true);if(typeof a.callback=="function"){a.callback.call(a.scope||a)}delete a.callback;delete a.scope}});Ext.define("Ext.dd.DragSource",{extend:"Ext.dd.DDProxy",requires:["Ext.dd.StatusProxy","Ext.dd.DragDropManager"],dropAllowed:Ext.baseCSSPrefix+"dd-drop-ok",dropNotAllowed:Ext.baseCSSPrefix+"dd-drop-nodrop",animRepair:true,repairHighlightColor:"c3daf9",constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=new Ext.dd.StatusProxy({id:this.el.id+"-drag-status-proxy",animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&&this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,alignElWithMouse:function(){this.proxy.ensureAttachedToBody(true);return this.callParent(arguments)},startDrag:function(a,b){this.proxy.reset();this.proxy.hidden=false;this.dragging=true;this.proxy.update("");this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define("Ext.draw.SpriteDD",{extend:"Ext.dd.DragSource",constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle("cursor","move")},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var j=this,g=j.el,m,d,c,o,n,s,a,k,h,q,p;p=j.sprite;q=p.getBBox();try{m=Ext.Element.getXY(g)}catch(i){}if(!m){return null}d=m[0];c=d+q.width;o=m[1];n=o+q.height;return new Ext.util.Region(o,c,n,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(i){var h=i.getXY(),g=this,d=g.sprite,a=d.attr,c,b;h=g.sprite.surface.transformToViewBox(h[0],h[1]);c=h[0]-g.prev[0];b=h[1]-g.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);g.prev=h},setDragElPos:function(){return false}});Ext.define("Ext.draw.Sprite",{mixins:{observable:"Ext.util.Observable",animate:"Ext.util.Animate"},requires:["Ext.draw.SpriteDD"],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:["font","font-size","font-weight","font-style","font-family","text-anchor","text"],pathProperties:["x","y","d","path","height","width","radius","r","rx","ry","cx","cy"],constructor:function(a){var b=this;a=Ext.merge({},a||{});b.id=Ext.id(null,"ext-sprite-");b.transformations=[];Ext.copyTo(this,a,"surface,group,type,draggable");b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents("beforedestroy","destroy","render","mousedown","mouseup","mouseover","mouseout","mousemove","click");b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSpriteElement(a)}a.dd=new Ext.draw.SpriteDD(a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on("beforedestroy",a.dd.destroy,a.dd)},setAttributes:function(k,n){var s=this,j=s.fontProperties,q=j.length,g=s.pathProperties,e=g.length,r=!!s.surface,a=r&&s.surface.customAttributes||{},b=s.attr,l,o,h,c,p,m,t,d;k=Ext.apply({},k);for(l in a){if(k.hasOwnProperty(l)&&typeof a[l]=="function"){Ext.apply(k,a[l].apply(s,[].concat(k[l])))}}if(!!k.hidden!==!!b.hidden){s.dirtyHidden=true}for(o=0;o<e;o++){l=g[o];if(l in k&&k[l]!==b[l]){s.dirtyPath=true;break}}if("zIndex" in k){s.zIndexDirty=true}if("text" in k){s.dirtyFont=true}for(o=0;o<q;o++){l=j[o];if(l in k&&k[l]!==b[l]){s.dirtyFont=true;break}}h=k.translate;c=b.translation;if(h){if((h.x&&h.x!==c.x)||(h.y&&h.y!==c.y)){Ext.apply(c,h);s.dirtyTransform=true}delete k.translate}p=k.rotate;m=b.rotation;if(p){if((p.x&&p.x!==m.x)||(p.y&&p.y!==m.y)||(p.degrees&&p.degrees!==m.degrees)){Ext.apply(m,p);s.dirtyTransform=true}delete k.rotate}t=k.scale;d=b.scaling;if(t){if((t.x&&t.x!==d.x)||(t.y&&t.y!==d.y)||(t.cx&&t.cx!==d.cx)||(t.cy&&t.cy!==d.cy)){Ext.apply(d,t);s.dirtyTransform=true}delete k.scale}Ext.apply(b,k);s.dirty=true;if(n===true&&r){s.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent("beforedestroy",a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent("destroy")}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define("Ext.draw.engine.Svg",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Svg",trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:"http://www.w3.org/1999/xlink",translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",path:"d",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start","font-family":null,"font-size":null,"font-weight":null,"font-style":null,fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS("http://www.w3.org/2000/svg",d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor="rgba(0,0,0,0)"}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=new Ext.draw.Matrix();a.bbox={plain:0,transform:0};a.fireEvent("render",a);return b},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(j){var k={},g,l,a,c,h,b;if(j&&j.el){b=j.el.dom;try{k=b.getBBox();return k}catch(d){}k={x:k.x,y:Infinity,width:0,height:0};h=b.getNumberOfChars();for(c=0;c<h;c++){g=b.getExtentOfChar(c);k.y=Math.min(g.y,k.y);l=g.y+g.height-k.y;k.height=Math.max(k.height,l);a=g.x+g.width-k.x;k.width=Math.max(k.width,a)}return k}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+"hide-visibility")},getDefs:function(){return this._defs||(this._defs=this.createSvgElement("defs"))},transform:function(d){var h=this,a=new Ext.draw.Matrix(),g=d.transformations,j=g.length,c=0,b,e;for(;c<j;c++){b=g[c];e=b.type;if(e=="translate"){a.translate(b.x,b.y)}else{if(e=="rotate"){a.rotate(b.degrees,b.x,b.y)}else{if(e=="scale"){a.scale(b.x,b.y,b.centerX,b.centerY)}}}}d.matrix=a;d.el.set({transform:a.toSvg()})},setSize:function(a,c){var d=this,b=d.el;a=+a||d.width;c=+c||d.height;d.width=a;d.height=c;b.setSize(a,c);b.set({width:a,height:c});d.callParent([a,c])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&&isFinite(d)&&isFinite(c)&&isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute("viewBox",[b,d,c,a].join(" "))}},render:function(c){var g=this;if(!g.el){var e=g.width||10,b=g.height||10,d=g.createSvgElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:e,height:b}),a=g.getDefs(),h=g.createSvgElement("rect",{width:"100%",height:"100%",fill:"#000",stroke:"none",opacity:0}),i;if(Ext.isSafari3){i=g.createSvgElement("rect",{x:-10,y:-10,width:"110%",height:"110%",fill:"none",stroke:"#000"})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(i)}d.appendChild(h);c.appendChild(d);g.el=Ext.get(d);g.bgRect=Ext.get(h);if(Ext.isSafari3){g.webkitRect=Ext.get(i);g.webkitRect.hide()}g.el.on({scope:g,mouseup:g.onMouseUp,mousedown:g.onMouseDown,mouseover:g.onMouseOver,mouseout:g.onMouseOut,mousemove:g.onMouseMove,mouseenter:g.onMouseEnter,mouseleave:g.onMouseLeave,click:g.onClick})}g.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseenter",a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent("mouseleave",a)}},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);if(d.nodeName=="tspan"&&d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},tuneText:function(k,l){var a=k.el.dom,b=[],n,h,m,d,e,c,g,j;if(l.hasOwnProperty("text")){m=k.tspans&&Ext.Array.map(k.tspans,function(i){return i.textContent}).join("");if(!k.tspans||l.text!=m){b=this.setText(k,l.text);k.tspans=b}else{b=k.tspans||[]}}if(b.length){n=this.getBBoxText(k).height;j=k.el.dom.getAttribute("x");for(d=0,e=b.length;d<e;d++){g=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute("x",j);b[d].setAttribute("dy",d?n*1.2:n/g)}k.dirty=true}},setText:function(k,d){var h=this,a=k.el.dom,b=[],m,j,l,e,g,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split("\n");for(e=0,g=c.length;e<g;e++){l=c[e];if(l){j=h.createSvgElement("tspan");j.appendChild(document.createTextNode(Ext.htmlDecode(l)));a.appendChild(j);b[e]=j}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);this.applyTransformations(a)}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(r){var m=this,c=r.el,q=r.group,j=r.attr,s=m.parsers,g=m.gradientsMap||{},k=Ext.isSafari&&!Ext.isStrict,e,h,l,p,d,o,b,a,n;if(q){e=[].concat(q);l=e.length;for(h=0;h<l;h++){q=e[h];m.getGroup(q).add(r)}delete r.group}p=m.scrubAttrs(r)||{};r.bbox.plain=0;r.bbox.transform=0;if(r.type=="circle"||r.type=="ellipse"){p.cx=p.cx||p.x;p.cy=p.cy||p.y}else{if(r.type=="rect"){p.rx=p.ry=p.r}else{if(r.type=="path"&&p.d){p.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(p.d))}}}r.dirtyPath=false;if(p["clip-rect"]){m.setClip(r,p);delete p["clip-rect"]}if(r.type=="text"&&p.font&&r.dirtyFont){c.set({style:"font: "+p.font})}if(r.type=="image"){c.dom.setAttributeNS(m.xlink,"href",p.src)}Ext.applyIf(p,m.minDefaults[r.type]);if(r.dirtyHidden){(j.hidden)?m.hidePrim(r):m.showPrim(r);r.dirtyHidden=false}for(o in p){if(p.hasOwnProperty(o)&&p[o]!=null){if(k&&("color|stroke|fill".indexOf(o)>-1)&&(p[o] in g)){p[o]=g[p[o]]}if(o in s){c.dom.setAttribute(o,s[o](p[o],r,m))}else{c.dom.setAttribute(o,p[o])}}}if(r.type=="text"){m.tuneText(r,p)}r.dirtyFont=false;b=j.style;if(b){c.setStyle(b)}r.dirty=false;if(Ext.isSafari3){m.webkitRect.show();setTimeout(function(){m.webkitRect.hide()})}},setClip:function(b,g){var e=this,d=g["clip-rect"],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement("clipPath");c=e.createSvgElement("rect");a.id=Ext.id(null,"ext-clip-");c.setAttribute("x",d.x);c.setAttribute("y",d.y);c.setAttribute("width",d.width);c.setAttribute("height",d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute("clip-path","url(#"+a.id+")");b.clip=c}},applyZIndex:function(d){var g=this,b=g.items,a=b.indexOf(d),e=d.el,c;if(g.el.dom.childNodes[a+2]!==e.dom){if(a>0){do{c=b.getAt(--a).el}while(!c&&a>0)}e.insertAfter(c||g.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=new Ext.draw.Sprite(a);b.surface=this;return b},addGradient:function(h){h=Ext.draw.Draw.parseGradient(h);var e=this,d=h.stops.length,a=h.vector,l=Ext.isSafari&&!Ext.isStrict,j,g,k,c,b;b=e.gradientsMap||{};if(!l){if(h.type=="linear"){j=e.createSvgElement("linearGradient");j.setAttribute("x1",a[0]);j.setAttribute("y1",a[1]);j.setAttribute("x2",a[2]);j.setAttribute("y2",a[3])}else{j=e.createSvgElement("radialGradient");j.setAttribute("cx",h.centerX);j.setAttribute("cy",h.centerY);j.setAttribute("r",h.radius);if(Ext.isNumber(h.focalX)&&Ext.isNumber(h.focalY)){j.setAttribute("fx",h.focalX);j.setAttribute("fy",h.focalY)}}j.id=h.id;e.getDefs().appendChild(j);for(c=0;c<d;c++){g=h.stops[c];k=e.createSvgElement("stop");k.setAttribute("offset",g.offset+"%");k.setAttribute("stop-color",g.color);k.setAttribute("stop-opacity",g.opacity);j.appendChild(k)}}else{b["url(#"+h.id+")"]=h.stops[0].color}e.gradientsMap=b},hasCls:function(a,b){return b&&(" "+(a.el.dom.getAttribute("class")||"")+" ").indexOf(" "+b+" ")!=-1},addCls:function(e,h){var g=e.el,d,a,c,b=[],j=g.getAttribute("class")||"";if(!Ext.isArray(h)){if(typeof h=="string"&&!this.hasCls(e,h)){g.set({"class":j+" "+h})}}else{for(d=0,a=h.length;d<a;d++){c=h[d];if(typeof c=="string"&&(" "+j+" ").indexOf(" "+c+" ")==-1){b.push(c)}}if(b.length){g.set({"class":" "+b.join(" ")})}}},removeCls:function(k,g){var h=this,b=k.el,d=b.getAttribute("class")||"",c,j,e,l,a;if(!Ext.isArray(g)){g=[g]}if(d){a=d.replace(h.trimRe," ").split(h.spacesRe);for(c=0,e=g.length;c<e;c++){l=g[c];if(typeof l=="string"){l=l.replace(h.trimRe,"");j=Ext.Array.indexOf(a,l);if(j!=-1){Ext.Array.erase(a,j,1)}}}b.set({"class":a.join(" ")})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.draw.engine.Vml",{extend:"Ext.draw.Surface",requires:["Ext.draw.Draw","Ext.draw.Color","Ext.draw.Sprite","Ext.draw.Matrix","Ext.Element"],engine:"Vml",map:{M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s-]+/g,fillUrlRe:/^url\(\s*['"]?([^\)]+?)['"]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['"]+|['"]+$/g,baseVmlCls:Ext.baseCSSPrefix+"vml-base",vmlGroupCls:Ext.baseCSSPrefix+"vml-group",spriteCls:Ext.baseCSSPrefix+"vml-sprite",measureSpanCls:Ext.baseCSSPrefix+"vml-measure-span",zoom:21600,coordsize:1000,coordorigin:"0 0",orderSpritesByZIndex:false,path2vml:function(t){var n=this,u=n.NonVmlPathRe,b=n.map,e=n.valRe,s=n.zoom,d=n.bitesRe,g=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),m,o,c,a,k,q,h,l;if(String(t).match(u)){g=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(t).match(n.partialPathRe)){m=String(t).replace(d,function(r,w,j){var v=[],i=w.toLowerCase()=="m",p=b[w];j.replace(e,function(x){if(i&&v.length===2){p+=v+b[w=="m"?"l":"L"];v=[]}v.push(Math.round(x*s))});return p+v});return m}}o=g(t);m=[];for(k=0,q=o.length;k<q;k++){c=o[k];a=o[k][0].toLowerCase();if(a=="z"){a="x"}for(h=1,l=c.length;h<l;h++){a+=Math.round(c[h]*n.zoom)+(h!=l-1?",":"")}m.push(a)}return m.join(" ")},translateAttrs:{radius:"r",radiusX:"rx",radiusY:"ry",lineWidth:"stroke-width",fillOpacity:"fill-opacity",strokeOpacity:"stroke-opacity",strokeLinejoin:"stroke-linejoin"},minDefaults:{circle:{fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},text:{x:0,y:0,"text-anchor":"start",font:'10px "Arial"',fill:"#000",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},path:{d:"M0,0",fill:"none",stroke:null,"stroke-width":null,opacity:null,"fill-opacity":null,"stroke-opacity":null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:"none",opacity:null}},onMouseEnter:function(a){this.fireEvent("mouseenter",a)},onMouseLeave:function(a){this.fireEvent("mouseleave",a)},processEvent:function(b,g){var d=g.getTarget(),a=this.surface,c;this.fireEvent(b,g);c=this.items.get(d.id);if(c){c.fireEvent(b,c,g)}},createSpriteElement:function(h){var e=this,d=h.attr,g=h.type,j=e.zoom,b=h.vml||(h.vml={}),k=Math.round,c=(g==="image")?e.createNode("image"):e.createNode("shape"),l,i,a;c.coordsize=j+" "+j;c.coordorigin=d.coordorigin||"0 0";Ext.get(c).addCls(e.spriteCls);if(g=="text"){b.path=l=e.createNode("path");l.textpathok=true;b.textpath=a=e.createNode("textpath");a.on=true;c.appendChild(a);c.appendChild(l)}c.id=h.id;h.el=Ext.get(c);e.el.appendChild(c);if(g!=="image"){i=e.createNode("skew");i.on=true;c.appendChild(i);h.skew=i}h.matrix=new Ext.draw.Matrix();h.bbox={plain:null,transform:null};h.fireEvent("render",h);return h.el},getBBox:function(a,b){var c=this["getPath"+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(n){var t=this,d=n.vml,k=n.group,b=n.attr,c=n.el,p=c.dom,q,v,s,o,l,r,m,u,a;if(k){s=[].concat(k);l=s.length;for(o=0;o<l;o++){k=s[o];t.getGroup(k).add(n)}delete n.group}r=t.scrubAttrs(n)||{};if(n.zIndexDirty){t.setZIndex(n)}Ext.applyIf(r,t.minDefaults[n.type]);if(n.type=="image"){Ext.apply(n.attr,{x:r.x,y:r.y,width:r.width,height:r.height});a=n.getBBox();c.setStyle({width:a.width+"px",height:a.height+"px"});p.src=r.src}if(p.href){p.href=r.href}if(p.title){p.title=r.title}if(p.target){p.target=r.target}if(p.cursor){p.cursor=r.cursor}if(n.dirtyHidden){(r.hidden)?t.hidePrim(n):t.showPrim(n);n.dirtyHidden=false}if(n.dirtyPath){if(n.type=="circle"||n.type=="ellipse"){var g=r.x,e=r.y,j=r.rx||r.r||0,h=r.ry||r.r||0;p.path=Ext.String.format("ar{0},{1},{2},{3},{4},{1},{4},{1}",Math.round((g-j)*t.zoom),Math.round((e-h)*t.zoom),Math.round((g+j)*t.zoom),Math.round((e+h)*t.zoom),Math.round(g*t.zoom));n.dirtyPath=false}else{if(n.type!=="text"&&n.type!=="image"){n.attr.path=r.path=t.setPaths(n,r)||r.path;p.path=t.path2vml(r.path);n.dirtyPath=false}}}if("clip-rect" in r){t.setClip(n,r)}if(n.type=="text"){t.setTextAttributes(n,r)}if(r.opacity||r["stroke-opacity"]||r.fill){t.setFill(n,r)}if(r.stroke||r["stroke-opacity"]||r.fill){t.setStroke(n,r)}q=b.style;if(q){c.setStyle(q)}n.dirty=false},setZIndex:function(a){if(a.el){if(a.attr.zIndex!=undefined){a.el.setStyle("zIndex",a.attr.zIndex)}a.zIndexDirty=false}},setPaths:function(b,c){var a=b.attr;b.bbox.plain=null;b.bbox.transform=null;if(b.type=="circle"){a.rx=a.ry=c.r;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="ellipse"){a.rx=c.rx;a.ry=c.ry;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type=="rect"){a.rx=a.ry=c.r;return Ext.draw.Draw.rectPath(b)}else{if(b.type=="path"&&a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(k,e){var h=this,c=k.el.dom,j=c.fill,b=false,g,i,a,l,d;if(!j){j=c.fill=h.createNode("fill");b=true}if(Ext.isArray(e.fill)){e.fill=e.fill[0]}if(e.fill=="none"){j.on=false}else{if(typeof e.opacity=="number"){j.opacity=e.opacity}if(typeof e["fill-opacity"]=="number"){j.opacity=e["fill-opacity"]}j.on=true;if(typeof e.fill=="string"){a=e.fill.match(h.fillUrlRe);if(a){a=a[1];if(a.charAt(0)=="#"){i=h.gradientsColl.getByKey(a.substring(1))}if(i){l=e.rotation;d=-(i.angle+270+(l?l.degrees:0))%360;if(d===0){d=180}j.angle=d;j.type="gradient";j.method="sigma";if(j.colors){j.colors.value=i.colors}else{j.colors=i.colors}}else{j.src=a;j.type="tile"}}else{j.color=Ext.draw.Color.toHex(e.fill);j.src="";j.type="solid"}}}if(b){c.appendChild(j)}},setStroke:function(b,h){var e=this,d=b.el.dom,i=b.strokeEl,g=false,c,a;if(!i){i=b.strokeEl=e.createNode("stroke");g=true}if(Ext.isArray(h.stroke)){h.stroke=h.stroke[0]}if(!h.stroke||h.stroke=="none"||h.stroke==0||h["stroke-width"]==0){i.on=false}else{i.on=true;if(h.stroke&&!h.stroke.match(e.fillUrlRe)){i.color=Ext.draw.Color.toHex(h.stroke)}i.dashstyle=h["stroke-dasharray"]?"dash":"solid";i.joinstyle=h["stroke-linejoin"];i.endcap=h["stroke-linecap"]||"round";i.miterlimit=h["stroke-miterlimit"]||8;c=parseFloat(h["stroke-width"]||1)*0.75;a=h["stroke-opacity"]||1;if(Ext.isNumber(c)&&c<1){i.weight=1;i.opacity=a*c}else{i.weight=c;i.opacity=a}}if(g){d.appendChild(i)}},setClip:function(b,g){var e=this,c=b.el,a=b.clipEl,d=String(g["clip-rect"]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement("div"));a.addCls(Ext.baseCSSPrefix+"vml-sprite")}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle("clip",Ext.String.format("rect({1}px {2}px {3}px {0}px)",d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle("clip","")}},setTextAttributes:function(i,c){var h=this,a=i.vml,e=a.textpath.style,g=h.span.style,j=h.zoom,k=Math.round,l={fontSize:"font-size",fontWeight:"font-weight",fontStyle:"font-style"},b,d;if(i.dirtyFont){if(c.font){e.font=g.font=c.font}if(c["font-family"]){e.fontFamily='"'+c["font-family"].split(",")[0].replace(h.fontFamilyRe,"")+'"';g.fontFamily=c["font-family"]}for(b in l){d=c[l[b]];if(d){e[b]=g[b]=d}}h.setText(i,c.text);if(a.textpath.string){h.span.innerHTML=String(a.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>")}a.W=h.span.offsetWidth;a.H=h.span.offsetHeight+2;if(c["text-anchor"]=="middle"){e["v-text-align"]="center"}else{if(c["text-anchor"]=="end"){e["v-text-align"]="right";a.bbx=-Math.round(a.W/2)}else{e["v-text-align"]="left";a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format("m{0},{1}l{2},{1}",Math.round(a.X*j),Math.round(a.Y*j),Math.round(a.X*j)+1);i.bbox.plain=null;i.bbox.transform=null;i.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+"hide-visibility")},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+"hide-visibility")},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}c.callParent(arguments)}},applyViewBox:function(){var c=this,d=c.viewBox,b=c.width,a=c.height;c.callParent();if(d&&(b||a)){c.items.each(function(e){c.applyTransformations(e)})}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},render:function(a){var c=this,g=Ext.getDoc().dom;if(!c.createNode){try{if(!g.namespaces.rvml){g.namespaces.add("rvml","urn:schemas-microsoft-com:vml")}c.createNode=function(e){return g.createElement("<rvml:"+e+' class="rvml">')}}catch(d){c.createNode=function(e){return g.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}if(!c.el){var b=g.createElement("div");c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=g.createElement("span");Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||10,c.height||10);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=new Ext.draw.Matrix();b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},transform:function(x){var H=this,b=H.getBBox(x,true),j=b.x+b.width*0.5,h=b.y+b.height*0.5,B=new Ext.draw.Matrix(),q=x.transformations,v=q.length,C=0,o=0,d=1,c=1,n="",g=x.el,E=g.dom,z=E.style,a=H.zoom,k=x.skew,D=H.viewBoxShift,G,F,s,l,r,p,A,w,u,t,e,m;for(;C<v;C++){s=q[C];l=s.type;if(l=="translate"){B.translate(s.x,s.y)}else{if(l=="rotate"){B.rotate(s.degrees,s.x,s.y);o+=s.degrees}else{if(l=="scale"){B.scale(s.x,s.y,s.centerX,s.centerY);d*=s.x;c*=s.y}}}}if(D){B.prepend(D.scale,0,0,D.scale,D.dx*D.scale,D.dy*D.scale)}x.matrix=B;if(x.type!="image"&&k){k.origin="0,0";k.matrix=B.toString();m=B.offset();if(m[0]>32767){m[0]=32767}else{if(m[0]<-32768){m[0]=-32768}}if(m[1]>32767){m[1]=32767}else{if(m[1]<-32768){m[1]=-32768}}k.offset=m}else{G=B.matrix[0][2];F=B.matrix[1][2];u=a/d;t=a/c;E.coordsize=Math.abs(u)+" "+Math.abs(t);w=o*(d*((c<0)?-1:1));if(w!=z.rotation&&!(w===0&&!z.rotation)){z.rotation=w}if(o){r=H.rotationCompensation(o,G,F);G=r.x;F=r.y}if(d<0){n+="x"}if(c<0){n+=" y";p=-1}if(n!=""&&!E.style.flip){z.flip=n}e=(G*-u)+" "+(F*-t);if(e!=E.coordorigin){E.coordorigin=(G*-u)+" "+(F*-t)}}},createItem:function(a){return Ext.create("Ext.draw.Sprite",a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&&a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&&a.el){a.el.removeCls(b)}},addGradient:function(d){var a=this.gradientsColl||(this.gradientsColl=Ext.create("Ext.util.MixedCollection")),b=[],c=Ext.create("Ext.util.MixedCollection");c.addAll(d.stops);c.sortByKey("ASC",function(g,e){g=parseInt(g,10);e=parseInt(e,10);return g>e?1:(g<e?-1:0)});c.eachKey(function(g,e){b.push(g+"% "+e.color)});a.add(d.id,{colors:b.join(","),angle:d.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define("Ext.dd.DragZone",{extend:"Ext.dd.DragSource",constructor:function(b,a){this.callParent([b,a]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){var a=this;if(Ext.enableFx){Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)}a.dragging=false},getRepairXY:function(a){return Ext.Element.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define("Ext.flash.Component",{extend:"Ext.Component",alternateClassName:"Ext.FlashComponent",alias:"widget.flash",flashVersion:"9.0.115",backgroundColor:"#ffffff",wmode:"opaque",swfWidth:"100%",swfHeight:"100%",expressInstall:false,renderTpl:['<div id="{swfId}"></div>'],initComponent:function(){this.callParent();this.addEvents("success","failure")},onRender:function(){var c=this,e,d,b,a=c.getSwfId();c.renderData.swfId=a;c.callParent(arguments);e=Ext.apply({allowScriptAccess:"always",bgcolor:c.backgroundColor,wmode:c.wmode},c.flashParams);d=Ext.apply({allowedDomain:document.location.hostname},c.flashVars);new swfobject.embedSWF(c.url,a,c.swfWidth,c.swfHeight,c.flashVersion,c.expressInstall?c.statics.EXPRESS_INSTALL_URL:b,d,e,c.flashAttributes,Ext.bind(c.swfCallback,c))},swfCallback:function(b){var a=this;if(b.success){a.swf=Ext.get(b.ref);a.onSuccess();a.fireEvent("success",a)}else{a.onFailure();a.fireEvent("failure",a)}},getSwfId:function(){return this.swfId||(this.swfId="extswf"+this.getAutoId())},onSuccess:function(){this.swf.setStyle("visibility","inherit")},onFailure:Ext.emptyFn,beforeDestroy:function(){var b=this,a=b.swf;if(a){swfobject.removeSWF(b.getSwfId());Ext.destroy(a);delete b.swf}b.callParent()},statics:{EXPRESS_INSTALL_URL:"http://swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf"}});Ext.define("Ext.form.CheckboxManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a){return this.filterBy(function(b){return b.name==a})},getWithValue:function(a,b){return this.filterBy(function(c){return c.name==a&&c.inputValue==b})},getChecked:function(a){return this.filterBy(function(b){return b.name==a&&b.checked})}});Ext.define("Ext.form.Label",{extend:"Ext.Component",alias:"widget.label",requires:["Ext.util.Format"],autoEl:"label",maskOnDisable:false,getElConfig:function(){var a=this;a.html=a.text?Ext.util.Format.htmlEncode(a.text):(a.html||"");return Ext.apply(a.callParent(),{htmlFor:a.forId||""})},setText:function(c,b){var a=this;b=b!==false;if(b){a.text=c;delete a.html}else{a.html=c;delete a.text}if(a.rendered){a.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(c):c}return this}});Ext.define("Ext.form.Labelable",{requires:["Ext.XTemplate"],autoEl:{tag:"table",cellspacing:0,cellpadding:0},childEls:["labelCell","labelEl","bodyEl","errorEl","inputRow"],labelableRenderTpl:["<tpl if=\"labelAlign=='top'\">","<tr>",'<td id="{id}-labelCell" colspan="3" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tr>","</tpl>",'<tr id="{id}-inputRow" <tpl if="inFormLayout">id="{id}" class="{componentClass}"</tpl>>','<tpl if="labelOnLeft">','<td id="{id}-labelCell" style="{labelCellStyle}" {labelCellAttrs}>',"{beforeLabelTpl}",'<label id="{id}-labelEl" {labelAttrTpl}<tpl if="inputId"> for="{inputId}"</tpl> class="{labelCls}"','<tpl if="labelStyle"> style="{labelStyle}"</tpl>>',"{beforeLabelTextTpl}",'<tpl if="fieldLabel">{fieldLabel}{labelSeparator}</tpl>',"{afterLabelTextTpl}","</label>","{afterLabelTpl}","</td>","</tpl>",'<td class="{baseBodyCls} {fieldBodyCls}" id="{id}-bodyEl" role="presentation" colspan="{bodyColspan}">',"{beforeSubTpl}","{[values.$comp.getSubTplMarkup()]}","{afterSubTpl}","</td>","<tpl if=\"msgTarget=='side'\">",'<td id="{id}-errorEl" class="{errorMsgCls}" style="display:none" width="{errorIconWidth}"></td>',"</tpl>","</tr>","<tpl if=\"msgTarget=='under'\">","<tr>",'<tpl if="labelOnLeft">',"<td></td>","</tpl>",'<td id="{id}-errorEl" class="{errorMsgClass}" colspan="{[values.labelOnLeft ? 2 : 3]}" style="display:none"></td>',"</tr>","</tpl>",{disableFormats:true}],activeErrorsTpl:['<tpl if="errors && errors.length">','<ul><tpl for="errors"><li<tpl if="xindex == xcount"> class="last"</tpl>>{.}</li></tpl></ul>',"</tpl>"],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+"form-item",labelCls:Ext.baseCSSPrefix+"form-item-label",errorMsgCls:Ext.baseCSSPrefix+"form-error-msg",baseBodyCls:Ext.baseCSSPrefix+"form-item-body",fieldBodyCls:"",clearCls:Ext.baseCSSPrefix+"clear",invalidCls:Ext.baseCSSPrefix+"form-invalid",fieldLabel:undefined,labelAlign:"left",labelWidth:100,labelPad:5,labelSeparator:":",hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:"qtip",noWrap:true,labelableInsertions:["beforeLabelTpl","afterLabelTpl","beforeSubTpl","afterSubTpl","beforeLabelTextTpl","afterLabelTextTpl","labelAttrTpl"],labelableRenderProps:"labelAlign,fieldBodyCls,baseBodyCls,clearCls,labelSeparator,msgTarget",initLabelable:function(){var a=this;a.addCls(a.formItemCls);a.lastActiveError="";a.addEvents("errorchange")},getFieldLabel:function(){return this.fieldLabel||""},setFieldLabel:function(b){b=b||"";var d=this,e=d.labelSeparator,a=d.labelEl,c;d.fieldLabel=b;if(d.rendered){if(Ext.isEmpty(b)&&d.hideEmptyLabel){Ext.destroy(d.labelEl);d.labelEl=null}else{a=d.createLabelEl();c=b.substr(b.length-1);if(c!=e){b+=e}a.update(b)}d.doComponentLayout()}},createLabelEl:function(){var a=this;if(!a.labelEl){a.labelEl=a.el.insertFirst({tag:"label",htmlFor:a.getInputId(),cls:a.getLabelCls(),style:a.getLabelStyle()})}return a.labelEl},getInsertionRenderData:function(d,e){var b=e.length,a,c;while(b--){a=e[b];c=this[a];if(c){if(typeof c!="string"){if(!c.isTemplate){c=Ext.XTemplate.getTpl(this,a)}c=c.apply(d)}}d[a]=c||""}return d},getLabelableRenderData:function(){var a=this,b;if(!Ext.form.Labelable.errorIconWidth){Ext.form.Labelable.errorIconWidth=parseInt(Ext.util.CSS.getRule("."+Ext.baseCSSPrefix+"form-invalid-icon").style.width,10)}b=Ext.copyTo({componentClass:a.protoEl?a.protoEl.classList.join(" "):"",inFormLayout:a.ownerLayout&&a.ownerLayout.type==="form",inputId:a.getInputId(),labelOnLeft:a.labelAlign!="top",fieldLabel:a.getFieldLabel(),labelCellStyle:a.getLabelCellStyle(),labelCellAttrs:a.getLabelCellAttrs(),labelCls:a.getLabelCls(),labelStyle:a.getLabelStyle(),bodyColspan:a.getBodyColspan(),errorMsgCls:a.errorMsgCls+(a.autoFitErrors?"":" "+Ext.baseCSSPrefix+"external-error-icon"),errorIconWidth:Ext.form.Labelable.errorIconWidth},a,a.labelableRenderProps,true);a.getInsertionRenderData(b,a.labelableInsertions);return b},getBodyColspan:function(){var c=this,b=c.hideLabel||(!c.getFieldLabel()&&c.hideEmptyLabel),a;a=(b||c.labelAlign==="top")?3:2;if(c.hasActiveError()){a--}return a},getLabelCls:function(){var b=this.labelCls,a=this.labelClsExtra;return a?b+" "+a:b},getLabelCellStyle:function(){var b=this,a=b.hideLabel||(!b.fieldLabel&&b.hideEmptyLabel);return a?"display:none;":""},getLabelCellAttrs:function(){var c=this,b=c.labelAlign,a="";if(b!=="top"){a='valign="top" halign="'+b+'" width="'+(c.labelWidth+c.labelPad)+'"'}return a},getLabelStyle:function(){var c=this,b=c.labelPad,a="";if(c.labelAlign==="top"){a="margin-bottom:"+b+"px;"}else{if(c.labelWidth){a="width:"+c.labelWidth+"px;"}a+="margin-right:"+b+"px;"}return a+(c.labelStyle||"")},getSubTplMarkup:function(){return""},getInputId:function(){return""},getActiveError:function(){return this.activeError||""},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.setActiveErrors(a)},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){a=Ext.Array.from(a);this.activeError=a[0];this.activeErrors=a;this.activeError=this.getTpl("activeErrorsTpl").apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent("errorchange",c,b);c.lastActiveError=b}if(c.rendered&&!c.isDestroyed&&!c.preventMark){c.el[a?"addCls":"removeCls"](c.invalidCls);c.getActionEl().dom.setAttribute("aria-invalid",a);if(c.errorEl){c.errorEl.dom.innerHTML=b}}},setFieldDefaults:function(b){var a=this;Ext.iterate(b,function(c,d){if(!a.hasOwnProperty(c)){a[c]=d}})}});Ext.define("Ext.form.RadioManager",{extend:"Ext.util.MixedCollection",singleton:true,getByName:function(a,b){return this.filterBy(function(c){return c.name==a&&c.getFormId()==b})},getWithValue:function(a,b,c){return this.filterBy(function(d){return d.name==a&&d.inputValue==b&&d.getFormId()==c})},getChecked:function(a,b){return this.findBy(function(c){return c.name==a&&c.checked&&c.getFormId()==b})}});Ext.define("Ext.form.action.DirectSubmit",{extend:"Ext.form.action.Submit",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectSubmit",alias:"formaction.directsubmit",type:"directsubmit",doSubmit:function(){var b=this,c=Ext.Function.bind(b.onComplete,b),a=b.buildForm();b.form.api.submit(a,c,b);Ext.removeNode(a)},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.Load",{extend:"Ext.form.action.Action",requires:["Ext.data.Connection"],alternateClassName:"Ext.form.Action.Load",alias:"formaction.load",type:"load",run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&&b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define("Ext.form.action.DirectLoad",{extend:"Ext.form.action.Load",requires:["Ext.direct.Manager"],alternateClassName:"Ext.form.Action.DirectLoad",alias:"formaction.directload",type:"directload",run:function(){this.form.api.load.apply(window,this.getArgs())},getArgs:function(){var g=this,c=[],e=g.form,b=e.paramOrder,h=g.getParams(),d,a;if(b){for(d=0,a=b.length;d<a;d++){c.push(h[b[d]])}}else{if(e.paramsAsHash){c.push(h)}}c.push(g.onComplete,g);return c},processResponse:function(a){return(this.result=a)},onComplete:function(b,a){if(b){this.onSuccess(b)}else{this.onFailure(null)}}});Ext.define("Ext.form.action.StandardSubmit",{extend:"Ext.form.action.Submit",alias:"formaction.standardsubmit",doSubmit:function(){var a=this.buildForm();a.submit();Ext.removeNode(a)}});Ext.define("Ext.grid.ColumnComponentLayout",{extend:"Ext.layout.component.Auto",alias:"layout.columncomponent",type:"columncomponent",setWidthInDom:true,getContentHeight:function(a){return this.owner.isGroupHeader?a.getProp("contentHeight"):this.callParent(arguments)},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(this.owner.isGroupHeader){a+=this.owner.titleEl.dom.offsetHeight}return a},getContentWidth:function(a){return this.owner.isGroupHeader?a.getProp("contentWidth"):this.callParent(arguments)},calculateOwnerWidthFromContentWidth:function(b,a){return a+b.getPaddingInfo().width}});Ext.define("Ext.grid.Lockable",{requires:["Ext.grid.LockingView"],syncRowHeight:true,spacerHidden:true,headerCounter:0,scrollDelta:40,unlockText:"Unlock",lockText:"Lock",determineXTypeToCreate:function(){var c=this,g;if(c.subGridXType){g=c.subGridXType}else{var d=this.getXTypes().split("/"),b=d.length,e=d[b-1],a=d[b-2];if(a!=="tablepanel"){g=a}else{g=e}}return g},injectLockable:function(){this.lockable=true;this.hasView=true;var l=this,m=l.store=Ext.StoreManager.lookup(l.store),a=l.determineXTypeToCreate(),j=l.getSelectionModel(),c={xtype:a,store:m,scrollerOwner:false,enableAnimations:false,scroll:false,selModel:j,border:false,cls:Ext.baseCSSPrefix+"grid-inner-locked",isLayoutRoot:function(){return false}},k={xtype:a,store:m,scrollerOwner:false,enableAnimations:false,selModel:j,border:false,isLayoutRoot:function(){return false}},g=0,d,b,h,n,e;l.addCls(Ext.baseCSSPrefix+"grid-locked");Ext.copyTo(k,l,l.bothCfgCopy);Ext.copyTo(c,l,l.bothCfgCopy);Ext.copyTo(k,l,l.normalCfgCopy);Ext.copyTo(c,l,l.lockedCfgCopy);for(;g<l.normalCfgCopy.length;g++){delete l[l.normalCfgCopy[g]]}for(g=0;g<l.lockedCfgCopy.length;g++){delete l[l.lockedCfgCopy[g]]}l.addEvents("lockcolumn","unlockcolumn");l.addStateEvents(["lockcolumn","unlockcolumn"]);l.lockedHeights=[];l.normalHeights=[];d=l.processColumns(l.columns);c.width=d.lockedWidth+Ext.num(j.headerWidth,0);c.columns=d.locked;k.columns=d.normal;k.flex=1;c.viewConfig=l.lockedViewConfig||{};c.viewConfig.loadingUseMsg=false;k.viewConfig=l.normalViewConfig||{};Ext.applyIf(c.viewConfig,l.viewConfig);Ext.applyIf(k.viewConfig,l.viewConfig);l.normalGrid=Ext.ComponentManager.create(k);l.lockedGrid=Ext.ComponentManager.create(c);l.view=new Ext.grid.LockingView({locked:l.lockedGrid,normal:l.normalGrid,panel:l});n=l.lockedGrid.getView();e=l.normalGrid.getView();n.on({scroll:{fn:l.onLockedViewScroll,element:"el",scope:l},mousewheel:{fn:l.onLockedViewMouseWheel,element:"el",scope:l}});e.on({scroll:{fn:l.onNormalViewScroll,element:"el",scope:l},refresh:l.createSpacer,beforerefresh:l.destroySpacer,scope:l});if(l.syncRowHeight){n.on({refresh:l.onLockedViewRefresh,itemupdate:l.onLockedViewItemUpdate,scope:l});e.on({refresh:l.onNormalViewRefresh,itemupdate:l.onNormalViewItemUpdate,scope:l})}b=l.lockedGrid.headerCt;h=l.normalGrid.headerCt;b.lockedCt=true;b.lockableInjected=true;h.lockableInjected=true;b.on({columnshow:l.onLockedHeaderShow,columnhide:l.onLockedHeaderHide,columnmove:l.onLockedHeaderMove,sortchange:l.onLockedHeaderSortChange,columnresize:l.onLockedHeaderResize,scope:l});h.on({columnmove:l.onNormalHeaderMove,sortchange:l.onNormalHeaderSortChange,scope:l});l.modifyHeaderCt();l.items=[l.lockedGrid,l.normalGrid];l.relayHeaderCtEvents(b);l.relayHeaderCtEvents(h);l.layout={type:"hbox",align:"stretch"}},processColumns:function(g){var e=0,a=g.length,b=0,d=[],c=[],h;for(;e<a;++e){h=g[e];h.processed=true;if(h.locked){if(!h.hidden){b+=h.width||Ext.grid.header.Container.prototype.defaultWidth}d.push(h)}else{c.push(h)}if(!h.headerId){h.headerId=(h.initialConfig||h).id||("L"+(++this.headerCounter))}}return{lockedWidth:b,locked:{items:d,itemId:"lockedHeaderCt",stretchMaxPartner:"^^>>#normalHeaderCt"},normal:{items:c,itemId:"normalHeaderCt",stretchMaxPartner:"^^>>#lockedHeaderCt"}}},onLockedViewMouseWheel:function(i){var d=this,h=-d.scrollDelta,a=h*i.getWheelDeltas().y,b=d.lockedGrid.getView().el.dom,c,g;if(b){c=b.scrollTop!==b.scrollHeight-b.clientHeight;g=b.scrollTop!==0}if((a<0&&g)||(a>0&&c)){i.stopEvent();b.scrollTop+=a}},onLockedViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;c.el.dom.scrollTop=d.el.dom.scrollTop;if(e.store.buffered){b=d.child("table",true);a=c.child("table",true);a.dom.style.top=b.dom.style.top}},onNormalViewScroll:function(){var e=this,d=e.lockedGrid.getView(),c=e.normalGrid.getView(),a,b;d.el.dom.scrollTop=c.el.dom.scrollTop;if(e.store.buffered){b=d.child("table",true);a=c.child("table",true);b.dom.style.top=a.dom.style.top}},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalViewRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedViewRefresh()}},createSpacer:function(){var c=this,a=c.lockedGrid.getView().el,b=c.normalGrid.getView().el.dom;c.spacerEl=Ext.core.DomHelper.append(a,{style:"height: "+(b.offsetHeight-b.clientHeight)+"px;"},true)},destroySpacer:function(){var a=this;if(a.spacerEl){a.spacerEl.destroy();delete a.spacerEl}},onLockedViewRefresh:function(){var e=this,a=e.lockedGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.lockedHeights=[];for(;b<d;b++){e.lockedHeights[b]=g[b].clientHeight}e.syncRowHeights()},onNormalViewRefresh:function(){var e=this,a=e.normalGrid.getView(),c=a.el,g=c.query(a.getItemSelector()),d=g.length,b=0;e.normalHeights=[];for(;b<d;b++){e.normalHeights[b]=g[b].clientHeight}e.syncRowHeights()},onLockedViewItemUpdate:function(a,b,c){this.lockedHeights[b]=c.clientHeight;this.syncRowHeights()},onNormalViewItemUpdate:function(a,b,c){this.normalHeights[b]=c.clientHeight;this.syncRowHeights()},syncRowHeights:function(){var k=this,b=k.lockedHeights,l=k.normalHeights,a=[],j=b.length,g=0,m,d,e,h,c;if(b.length&&l.length){m=k.lockedGrid.getView();d=k.normalGrid.getView();e=m.el.query(m.getItemSelector());h=d.el.query(d.getItemSelector());for(;g<j;g++){if(!isNaN(b[g])&&!isNaN(l[g])){if(b[g]>l[g]){Ext.fly(h[g]).setHeight(b[g])}else{if(b[g]<l[g]){Ext.fly(e[g]).setHeight(l[g])}}}}c=d.el.dom.scrollTop;d.el.dom.scrollTop=c;m.el.dom.scrollTop=c;k.lockedHeights=[];k.normalHeights=[]}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(b){var g=this,h=g.unlockText,i=g.lockText,c=Ext.baseCSSPrefix+"hmenu-unlock",e=Ext.baseCSSPrefix+"hmenu-lock",a=Ext.Function.bind(g.onUnlockMenuClick,g),d=Ext.Function.bind(g.onLockMenuClick,g);return function(){var j=Ext.grid.header.Container.prototype.getMenuItems.call(this);j.push("-",{cls:c,text:h,handler:a,disabled:!b});j.push({cls:e,text:i,handler:d,disabled:b});return j}},lock:function(a,d){var c=this,e=c.normalGrid,h=c.lockedGrid,g=e.headerCt,b=h.headerCt;a=a||g.getMenu().activeHeader;if(a.flex){a.width=a.getWidth();delete a.flex}Ext.suspendLayouts();g.remove(a,false);a.locked=true;if(Ext.isDefined(d)){b.insert(d,a)}else{b.add(a)}c.syncLockedSection();Ext.resumeLayouts(true);c.fireEvent("lockcolumn",c,a)},syncLockedSection:function(){var a=this;a.syncLockedWidth();a.lockedGrid.getView().refresh();a.normalGrid.getView().refresh()},syncLockedWidth:function(){var c=this,a=c.lockedGrid,b=a.headerCt.getFullWidth(true);c.suspendLayouts();if(b>0){a.setWidth(b);a.show()}else{a.hide()}c.resumeLayouts(true);return b>0},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,e){var d=this,g=d.normalGrid,i=d.lockedGrid,h=g.headerCt,c=i.headerCt,b=false;if(!Ext.isDefined(e)){e=0}a=a||c.getMenu().activeHeader;Ext.suspendLayouts();c.remove(a,false);if(d.syncLockedWidth()){b=true}a.locked=false;h.insert(e,a);if(b){d.lockedGrid.getView().refresh()}d.normalGrid.getView().refresh();Ext.resumeLayouts(true);d.fireEvent("unlockcolumn",d,a)},applyColumnsState:function(e){var l=this,c=l.lockedGrid,d=c.headerCt,j=l.normalGrid.headerCt,m=d.items,g=j.items,a,i=[],k=[],b,h=1;Ext.each(e,function(n){function o(p){return p.headerId==n.id}b=true;if(!(a=m.findBy(o))){a=g.findBy(o);b=false}if(a){if(a.applyColumnState){a.applyColumnState(n)}if(!Ext.isDefined(a.locked)){a.locked=b}if(a.locked){i.push(a);if(!a.hidden&&Ext.isNumber(a.width)){h+=a.width}}else{k.push(a)}}});if(i.length+k.length==m.getCount()+g.getCount()){d.removeAll(false);j.removeAll(false);d.add(i);j.add(k);c.setWidth(h)}},getColumnsState:function(){var b=this,a=b.lockedGrid.headerCt.getColumnsState(),c=b.normalGrid.headerCt.getColumnsState();return a.concat(c)},reconfigureLockable:function(a,b){var c=this,e=c.lockedGrid,d=c.normalGrid;if(b){Ext.suspendLayouts();e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);e.setWidth(b.lockedWidth);e.headerCt.add(b.locked.items);d.headerCt.add(b.normal.items);Ext.resumeLayouts(true)}if(a){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}}});Ext.define("Ext.grid.feature.AbstractSummary",{extend:"Ext.grid.feature.Feature",alias:"feature.abstractsummary",showSummaryRow:true,nestedIdRe:/\{\{id\}([\w\-]*)\}/g,toggleSummaryRow:function(a){this.showSummaryRow=!!a},getSummaryFragments:function(){var a={};if(this.showSummaryRow){Ext.apply(a,{printSummaryRow:Ext.bind(this.printSummaryRow,this)})}return a},printSummaryRow:function(b){var a=this.view.getTableChunker().metaRowTpl.join(""),c=Ext.baseCSSPrefix;a=a.replace(c+"grid-row",c+"grid-row-summary");a=a.replace("{{id}}","{gridSummaryValue}");a=a.replace(this.nestedIdRe,"{id$1}");a=a.replace("{[this.embedRowCls()]}","{rowCls}");a=a.replace("{[this.embedRowAttr()]}","{rowAttr}");a=new Ext.XTemplate(a,{firstOrLastCls:Ext.view.TableChunker.firstOrLastCls});return a.applyTemplate({columns:this.getPrintData(b)})},getColumnValue:function(c,a){var b=Ext.getCmp(c.id),e=a[c.id],d=b.summaryRenderer;if(d){e=d.call(b.scope||this,e,a,c.dataIndex)}return e},getSummary:function(a,b,d,c){if(b){if(Ext.isFunction(b)){return a.aggregate(b,null,c)}switch(b){case"count":return a.count(c);case"min":return a.min(d,c);case"max":return a.max(d,c);case"sum":return a.sum(d,c);case"average":return a.average(d,c);default:return c?{}:""}}}});Ext.define("Ext.grid.feature.Chunking",{extend:"Ext.grid.feature.Feature",alias:"feature.chunking",chunkSize:20,rowHeight:Ext.isIE?27:26,visibleChunk:0,hasFeatureEvent:false,attachEvents:function(){var b=this.view.up("gridpanel"),a=b.down("gridscroller[dock=right]");a.el.on("scroll",this.onBodyScroll,this,{buffer:300})},onBodyScroll:function(g,c){var b=this.view,d=c.scrollTop,a=Math.floor(d/this.rowHeight/this.chunkSize);if(a!==this.visibleChunk){this.visibleChunk=a;b.refresh();b.el.dom.scrollTop=d;b.el.dom.scrollTop=d}},collectData:function(d,m,l,k,j){var c={fullWidth:j.fullWidth,chunks:[]},e=j.rows.length,b=0,g=0,a=this.visibleChunk,h,p,n;for(;b<e;b+=this.chunkSize,g++){if(b+this.chunkSize>e){n=e-b}else{n=this.chunkSize}if(g>=a-1&&g<=a+1){p=j.rows.slice(b,b+this.chunkSize)}else{p=[]}c.chunks.push({rows:p,fullWidth:k,chunkHeight:n*this.rowHeight})}return c},getTableFragments:function(){return{openTableWrap:function(){return'<tpl for="chunks"><div class="'+Ext.baseCSSPrefix+'grid-chunk" style="height: {chunkHeight}px;">'},closeTableWrap:function(){return"</div></tpl>"}}}});Ext.define("Ext.grid.feature.GroupingSummary",{extend:"Ext.grid.feature.Grouping",alias:"feature.groupingsummary",mixins:{summary:"Ext.grid.feature.AbstractSummary"},getFeatureTpl:function(){var a=this.callParent(arguments);if(this.showSummaryRow){a=a.replace("</tpl>","");a+="{[this.printSummaryRow(xindex)]}</tpl>"}return a},getFragmentTpl:function(){var b=this,a=b.callParent();Ext.apply(a,b.getSummaryFragments());if(b.showSummaryRow){b.summaryGroups=b.view.store.getGroups();b.summaryData=b.generateSummaryData()}return a},getPrintData:function(j){var k=this,e=k.view.headerCt.getColumnsForTpl(),h=0,b=e.length,g=[],a=k.summaryGroups[j-1].name,d=k.summaryData[a],c;for(;h<b;++h){c=e[h];c.gridSummaryValue=this.getColumnValue(c,d);g.push(c)}return g},generateSummaryData:function(){var m=this,j={},o={},p=m.view.store,a=this.getGroupField(),l=p.proxy.reader,d=m.summaryGroups,g=m.view.headerCt.getColumnsForTpl(),b,h,c,e,n,q,k;for(h=0,c=d.length;h<c;++h){j[d[h].name]={}}if(m.remoteRoot&&l.rawData){n=l.root;l.root=m.remoteRoot;l.buildExtractors(true);Ext.Array.each(l.getRoot(l.rawData),function(i){o[i[a]]=i});l.root=n;l.buildExtractors(true)}for(h=0,c=g.length;h<c;++h){k=Ext.getCmp(g[h].id);e=m.getSummary(p,k.summaryType,k.dataIndex,true);for(q in e){if(e.hasOwnProperty(q)){j[q][k.id]=e[q]}}for(q in o){if(o.hasOwnProperty(q)){b=o[q][k.dataIndex];if(b!==undefined&&j[q]!==undefined){j[q][k.id]=b}}}}return j}});Ext.define("Ext.grid.feature.Summary",{extend:"Ext.grid.feature.AbstractSummary",alias:"feature.summary",getFragmentTpl:function(){this.summaryData=this.generateSummaryData();return this.getSummaryFragments()},getTableFragments:function(){if(this.showSummaryRow){return{closeRows:this.closeRows}}},closeRows:function(){return"</tpl>{[this.printSummaryRow()]}"},getPrintData:function(a){var g=this,c=g.view.headerCt.getColumnsForTpl(),b=0,e=c.length,h=[],j=g.summaryData,d;for(;b<e;++b){d=c[b];d.gridSummaryValue=this.getColumnValue(d,j);h.push(d)}return h},generateSummaryData:function(){var h=this,d={},j=h.view.store,c=h.view.headerCt.getColumnsForTpl(),e=0,a=c.length,b,k,g;for(e=0,a=c.length;e<a;++e){g=Ext.getCmp(c[e].id);d[g.id]=h.getSummary(j,g.summaryType,g.dataIndex,false)}return d}});Ext.define("Ext.grid.header.DragZone",{extend:"Ext.dd.DragZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+"grid-col-dd")},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getDragData:function(b){var d=b.getTarget("."+this.colHeaderCls),a;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&&a.draggable&&!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){var c=document.createElement("div");c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define("Ext.grid.header.DropZone",{extend:"Ext.dd.DropZone",colHeaderCls:Ext.baseCSSPrefix+"column-header",proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return"header-dd-zone-"+this.headerCt.up("[scrollerOwner]").id},getTargetFromEvent:function(a){return a.getTarget("."+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-top",html:"&#160;"},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:"col-move-bottom",html:"&#160;"},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),h,g;if((c.right-a)<=(c.right-c.left)/2){h="after"}else{h="before"}return{pos:h,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(x,p,v){var a=this.getLocation(v,p),r=a.header,h=a.pos,g=x.nextSibling("gridcolumn:not([hidden])"),u=x.previousSibling("gridcolumn:not([hidden])"),d,m,s,t,b,c,l,n,y,w;if(!r.draggable&&r.getIndex()===0){return false}this.lastLocation=a;if((x!==r)&&((h==="before"&&g!==r)||(h==="after"&&u!==r))&&!r.isDescendantOf(x)){var o=Ext.dd.DragDropManager.getRelated(this),k=o.length,q=0,j;for(;q<k;q++){j=o[q];if(j!==this&&j.invalidateDrop){j.invalidateDrop()}}this.valid=true;m=this.getTopIndicator();s=this.getBottomIndicator();if(h==="before"){t="tl";b="bl"}else{t="tr";b="br"}c=r.el.getAnchorXY(t);l=r.el.getAnchorXY(b);n=this.headerCt.el;y=n.getLeft();w=n.getRight();c[0]=Ext.Number.constrain(c[0],y,w);l[0]=Ext.Number.constrain(l[0],y,w);c[0]-=4;c[1]-=9;l[0]-=4;m.setXY(c);s.setXY(l);m.show();s.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(b,h,g,c){var i=this,d=i.headerCt,a=true,k=c.header,j;if(c.header.el.dom===b){a=false}else{if(d.restrictReorder){j=i.getLocation(g,b).header;a=k.ownerCt==j.ownerCt}}if(a){i.positionIndicator(c.header,b,g)}else{i.valid=false}return i.valid?i.dropAllowed:i.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(g,o,m,i){if(this.valid){this.invalidateDrop();var l=i.header,j=this.lastLocation,b=j.header,q=l.ownerCt,n=q.items.indexOf(l),k=b.ownerCt,s=k.items.indexOf(b),d=this.headerCt,a=d.getHeaderIndex(l),h=l.isGroupHeader?l.query(":not([isGroupHeader])").length:1,r=d.getHeaderIndex(b),p,c;if(j.pos==="after"){s++;r+=b.isGroupHeader?b.query(":not([isGroupHeader])").length:1}if(q!==k&&q.lockableInjected&&k.lockableInjected&&k.lockedCt){c=q.up("[scrollerOwner]");c.lock(l,s)}else{if(q!==k&&q.lockableInjected&&k.lockableInjected&&q.lockedCt){c=q.up("[scrollerOwner]");c.unlock(l,s)}else{if((q===k)&&(s>n)){s-=1}Ext.suspendLayouts();if(q!==k){q.remove(l,false)}if(q.isGroupHeader){if(!q.items.getCount()){p=q.ownerCt;p.remove(q,false);q.el.dom.parentNode.removeChild(q.el.dom)}else{q.minWidth=q.getWidth()-l.getWidth();q.setWidth(q.minWidth)}}if(q===k){k.move(n,s)}else{k.insert(s,l)}if(k.isGroupHeader){l.savedFlex=l.flex;delete l.flex;l.width=l.getWidth();k.minWidth=k.getWidth()+l.getWidth()-(l.savedFlex?1:0);k.setWidth(k.minWidth)}else{if(l.savedFlex){l.flex=l.savedFlex;delete l.width}}d.purgeCache();Ext.resumeLayouts(true);d.onHeaderMoved(l,h,a,r);if(!q.items.getCount()){q.destroy()}}}}}});Ext.define("Ext.grid.plugin.HeaderReorderer",{extend:"Ext.util.Observable",requires:["Ext.grid.header.DragZone","Ext.grid.header.DropZone"],alias:"plugin.gridheaderreorderer",init:function(a){this.headerCt=a;a.on({render:this.onHeaderCtRender,single:true,scope:this})},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){var a=this;a.dragZone=new Ext.grid.header.DragZone(a.headerCt);a.dropZone=new Ext.grid.header.DropZone(a.headerCt);if(a.disabled){a.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});Ext.define("Ext.grid.property.Property",{extend:"Ext.data.Model",alternateClassName:"Ext.PropGridProperty",fields:[{name:"name",type:"string"},{name:"value"}],idProperty:"name"});Ext.define("Ext.grid.property.Store",{extend:"Ext.data.Store",alternateClassName:"Ext.grid.PropertyStore",sortOnLoad:false,uses:["Ext.data.reader.Reader","Ext.data.proxy.Proxy","Ext.data.ResultSet","Ext.grid.property.Property"],constructor:function(a,c){var b=this;b.grid=a;b.source=c;b.callParent([{data:c,model:Ext.grid.property.Property,proxy:b.getProxy()}])},getProxy:function(){if(!this.proxy){Ext.grid.property.Store.prototype.proxy=new Ext.data.proxy.Memory({model:Ext.grid.property.Property,reader:this.getReader()})}return this.proxy},getReader:function(){if(!this.reader){Ext.grid.property.Store.prototype.reader=new Ext.data.reader.Reader({model:Ext.grid.property.Property,buildExtractors:Ext.emptyFn,read:function(a){return this.readRecords(a)},readRecords:function(b){var d,c,a={records:[],success:true};for(c in b){if(b.hasOwnProperty(c)){d=b[c];if(this.isEditableValue(d)){a.records.push(new Ext.grid.property.Property({name:c,value:d},c))}}}a.total=a.count=a.records.length;return new Ext.data.ResultSet(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)}})}return this.reader},setSource:function(a){var b=this;b.source=a;b.suspendEvents();b.removeAll();b.proxy.data=a;b.load();b.resumeEvents();b.fireEvent("datachanged",b);b.fireEvent("refresh",b)},getProperty:function(a){return Ext.isNumber(a)?this.getAt(a):this.getById(a)},setValue:function(e,c,a){var b=this,d=b.getRec(e);if(d){d.set("value",c);b.source[e]=c}else{if(a){b.source[e]=c;d=new Ext.grid.property.Property({name:e,value:c},e);b.add(d)}}},remove:function(b){var a=this.getRec(b);if(a){this.callParent([a]);delete this.source[b]}},getRec:function(a){return this.getById(a)},getSource:function(){return this.source}});Ext.define("Ext.layout.component.Body",{alias:["layout.body"],extend:"Ext.layout.component.Auto",type:"body",beginLayout:function(a){this.callParent(arguments);a.bodyContext=a.getEl("body")},calculateOwnerHeightFromContentHeight:function(c,b){var a=this.callParent(arguments);if(c.targetContext!=c){a+=c.getPaddingInfo().height}return a},calculateOwnerWidthFromContentWidth:function(c,a){var b=this.callParent(arguments);if(c.targetContext!=c){b+=c.getPaddingInfo().width}return b},measureContentWidth:function(c){var a=c.bodyContext.el.dom.offsetWidth,b=c.targetContext,d=b&&b.getPaddingInfo();c.bodyContext.setWidth(a,false);if(d){a+=d.width}return a},measureContentHeight:function(c){var b=c.bodyContext.el.dom.offsetHeight,a=c.targetContext,d=a&&a.getPaddingInfo();c.bodyContext.setHeight(b,false);if(d){b+=d.height}return b},publishInnerHeight:function(c,a){var d=a-c.getFrameInfo().height,b=c.targetContext;if(b){d-=b.getPaddingInfo().height}if(b!=c){d-=c.getPaddingInfo().height}c.bodyContext.setHeight(d,!c.heightModel.natural)},publishInnerWidth:function(d,c){var a=c-d.getFrameInfo().width,b=d.targetContext;if(b){a-=b.getPaddingInfo().width}if(b!=d){a-=d.getPaddingInfo().width}d.bodyContext.setWidth(a,!d.widthModel.natural)}});Ext.define("Ext.layout.component.BoundList",{extend:"Ext.layout.component.Auto",alias:"layout.boundlist",type:"component",beginLayout:function(d){var c=this,a=c.owner,b=a.pagingToolbar;c.callParent(arguments);if(a.floating){d.savedXY=a.el.getXY();a.el.setXY([-9999,-9999])}if(b){d.toolbarContext=d.context.getCmp(b)}d.listContext=d.getEl("listEl")},beginLayoutCycle:function(b){var a=this.owner;this.callParent(arguments);if(b.heightModel.auto){a.el.setHeight("auto");a.listEl.setHeight("auto")}},getLayoutItems:function(){var a=this.owner.pagingToolbar;return a?[a]:[]},isValidParent:function(){return true},finishedLayout:function(a){var b=a.savedXY;this.callParent(arguments);if(b){this.owner.el.setXY(b)}},measureContentWidth:function(a){return this.owner.listEl.getWidth()},measureContentHeight:function(a){return this.owner.listEl.getHeight()},publishInnerHeight:function(c,a){var b=c.toolbarContext,d=0;if(b){d=b.getProp("height")}if(d===undefined){this.done=false}else{c.listContext.setHeight(a-c.getFrameInfo().height-d)}},calculateOwnerHeightFromContentHeight:function(c){var a=this.callParent(arguments),b=c.toolbarContext;if(b){a+=b.getProp("height")}return a}});Ext.define("Ext.layout.component.Button",{alias:["layout.button"],extend:"Ext.layout.component.Auto",type:"button",cellClsRE:/-btn-(tl|br)\b/,htmlRE:/<.*>/,constructor:function(){this.callParent(arguments);this.hackWidth=(Ext.isIE6||Ext.isIE7)&&Ext.isStrict},beginLayout:function(a){this.callParent(arguments);this.cacheTargetInfo(a)},beginLayoutCycle:function(c){var b="",a=this.owner;this.callParent(arguments);a.btnInnerEl.setStyle("overflow",b);a.el.setStyle("width",b);a.btnEl.setStyle("width",b);a.btnInnerEl.setStyle("width",b);a.btnIconEl.setStyle("width",b)},calculateOwnerHeightFromContentHeight:function(b,a){return a},calculateOwnerWidthFromContentWidth:function(b,a){return a},measureContentWidth:function(c){var i=this,b=i.owner,g=b.btnEl,d=b.btnInnerEl,l,j,h,a,k,e;if(b.text&&i.hackWidth&&g&&g.getWidth()>20){l=i.btnFrameWidth;j=Ext.util.TextMetrics.measure(d,b.text);a=j.width+l+i.adjWidth;k=c.getEl("btnEl");e=c.getEl("btnInnerEl");h=(b.icon||b.iconCls)&&(b.iconAlign=="top"||b.iconAlign=="bottom");c.setWidth(a);k.setWidth(j.width+l);e.setWidth(j.width+l);if(h){b.btnIconEl.setWidth(j.width+l)}}else{a=c.el.getWidth()}return a},measureContentHeight:function(d){var c=this,b=c.owner,e=b.btnInnerEl,a;if(b.vertical){a=Ext.util.TextMetrics.measure(e,b.text).width;a+=c.btnFrameHeight+c.adjHeight;d.setHeight(a,true,true)}else{a=d.el.getHeight()}return a},publishInnerHeight:function(c,m){var j=this,a=j.owner,g=Ext.isNumber,i=c.getEl("btnEl"),d=a.btnInnerEl,h=c.getEl("btnInnerEl"),e=g(m)?m-j.adjHeight:m,b=j.btnFrameHeight,l=a.getText(),k;i.setHeight(e);h.setHeight(e);if(!a.vertical&&e>=0){h.setProp("line-height",e-b+"px")}if(l&&j.htmlRE.test(l)){h.setProp("line-height","normal");k=Ext.util.TextMetrics.measure(d,l).height;h.setProp("padding-top",j.btnFrameTop+Math.max(d.getHeight()-b-k,0)/2);h.setHeight(e)}},publishInnerWidth:function(g,c){var e=this,h=Ext.isNumber,a=g.getEl("btnEl"),b=g.getEl("btnInnerEl"),d=h(c)?c-e.adjWidth:c;a.setWidth(d);b.setWidth(d)},cacheTargetInfo:function(g){var e=this,a,c,d,b;if(!("adjWidth" in e)){a=e.owner;c=g.getFrameInfo();d=g.getEl("btnWrap").getPaddingInfo();b=g.getEl("btnInnerEl").getPaddingInfo();Ext.apply(e,{adjWidth:d.width+c.width,adjHeight:d.height+c.height,btnFrameWidth:b.width,btnFrameHeight:b.height,btnFrameTop:b.top})}e.callParent(arguments)}});Ext.define("Ext.layout.component.Dock",{extend:"Ext.layout.component.Component",alias:"layout.dock",alternateClassName:"Ext.layout.component.AbstractDock",type:"dock",initializedBorders:-1,horizontalCollapsePolicy:{width:true},verticalCollapsePolicy:{height:true},finishRender:function(){var b=this,c,a;b.callParent();c=b.getRenderTarget();a=b.getDockedItems();b.finishRenderItems(c,a)},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},dockOpposites:{top:"bottom",right:"left",bottom:"top",left:"right"},handleItemBorders:function(){var k=this,a=k.owner,j,n,c=k.borders,e=k.dockOpposites,b=a.dockedItems.generation,d,h,m,l,g;if(k.initializedBorders==b||(a.border&&!a.manageBodyBorders)){return}k.initializedBorders=b;n=k.getLayoutItems();j={top:[],right:[],bottom:[],left:[]};for(d=0,h=n.length;d<h;d++){m=n[d];l=m.dock;if(m.ignoreBorderManagement){continue}if(!j[l].satisfied){j[l].push(m);j[l].satisfied=true}if(!j.top.satisfied&&e[l]!=="top"){j.top.push(m)}if(!j.right.satisfied&&e[l]!=="right"){j.right.push(m)}if(!j.bottom.satisfied&&e[l]!=="bottom"){j.bottom.push(m)}if(!j.left.satisfied&&e[l]!=="left"){j.left.push(m)}}if(c){for(g in c){if(c.hasOwnProperty(g)){h=c[g].length;if(!a.manageBodyBorders){for(d=0;d<h;d++){c[g][d].removeCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}if(!c[g].satisfied&&!a.bodyBorder){a.removeBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}}else{if(c[g].satisfied){a.setBodyStyle("border-"+g+"-width","")}}}}}for(g in j){if(j.hasOwnProperty(g)){h=j[g].length;if(!a.manageBodyBorders){for(d=0;d<h;d++){j[g][d].addCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}if((!j[g].satisfied&&!a.bodyBorder)||a.bodyBorder===false){a.addBodyCls(Ext.baseCSSPrefix+"docked-noborder-"+g)}}else{if(j[g].satisfied){a.setBodyStyle("border-"+g+"-width","1px")}}}}k.borders=j},beginLayout:function(d){var m=this,c=m.owner,p=m.getLayoutItems(),b=d.context,k=p.length,l=false,e=false,n,j,o,a,g,h;m.callParent(arguments);m.handleItemBorders();h=c.getCollapsed();if(Ext.isDefined(m.lastCollapsedState)&&(h!==m.lastCollapsedState)){if(m.owner.collapsed){d.isCollapsingOrExpanding=1;c.addClsWithUI(c.collapsedCls)}else{d.isCollapsingOrExpanding=2;c.removeClsWithUI(c.collapsedCls);d.lastCollapsedState=m.lastCollapsedState}}m.lastCollapsedState=h;d.dockedItems=n=[];for(j=0;j<k;j++){o=p[j];a=b.getCmp(o);a.dockedAt={x:0,y:0};a.offsets=g=Ext.Element.parseBox(o.offsets||{});g.width=g.left+g.right;g.height=g.top+g.bottom;n.push(a)}if(c.collapsed){if(c.collapsedVertical()){l=true;d.measureDimensions=1}else{e=true;d.measureDimensions=2}}d.collapsedVert=l;d.collapsedHorz=e;d.bodyContext=d.getEl("body")},beginLayoutCycle:function(h){var g=this,j=h.dockedItems,b=j.length,a=g.owner,c,e,d;g.callParent(arguments);if(h.collapsedVert){h.heightModel=g.sizeModels.shrinkWrap}else{if(h.collapsedHorz){h.widthModel=g.sizeModels.shrinkWrap}}if(h.widthModel.shrinkWrap){a.body.setWidth(null);a.el.setWidth(null)}if(h.heightModel.shrinkWrap){a.body.setHeight(null);a.el.setHeight(null)}if(h.collapsedVert){h.setContentHeight(0)}else{if(h.collapsedHorz){h.setContentWidth(0)}}for(c=0;c<b;c++){e=j[c].target;d=e.dock;if(d=="right"){e.el.setLeft(0)}else{if(d!="left"){continue}}}},calculate:function(d){var k=this,c=k.measureAutoDimensions(d,d.measureDimensions),b=d.state,j=b.horzDone,e=b.vertDone,g=d.bodyContext,a,i,h,l;d.borderInfo||d.getBorderInfo();d.paddingInfo||d.getPaddingInfo();d.framingInfo||d.getFraming();g.borderInfo||g.getBorderInfo();g.paddingInfo||g.getPaddingInfo();a=!j&&k.createAxis(d,c.contentWidth,d.widthModel,"left","right","x","width","Width",d.collapsedHorz);i=!e&&k.createAxis(d,c.contentHeight,d.heightModel,"top","bottom","y","height","Height",d.collapsedVert);for(h=0,l=d.dockedItems.length;l--;++h){if(a){k.dockChild(d,a,l,h)}if(i){k.dockChild(d,i,l,h)}}if(a&&k.finishAxis(d,a)){b.horzDone=j=a}if(i&&k.finishAxis(d,i)){b.vertDone=e=i}if(j&&e&&k.finishConstraints(d,j,e)){k.finishPositions(d,j,e)}else{k.done=false}},createAxis:function(p,j,e,n,i,t,m,k,d){var v=0,b=this.owner,g=b["max"+k],c=b["min"+k]||0,l=g!=null,w=p.state["constrained"+k],o=w!=null,u="set"+k,r,a,s,q,h;if(e.shrinkWrap&&!o){if(d){h=0}else{a=p.bodyContext;h=j+a.borderInfo[m]}}else{r=p.borderInfo;s=p.framingInfo;q=p.paddingInfo;if(o){h=w;e=this.sizeModels.calculated;p[u](w)}else{h=p.getProp(m)}h-=r[i]+q[i]+s[i];v=r[n]+q[n]+s[n]}return{shrinkWrap:e.shrinkWrap,sizeModel:e,begin:v,end:h,collapsed:d,horizontal:t=="x",ignoreFrameBegin:false,ignoreFrameEnd:false,initialSize:h-v,hasMinMaxConstraints:(c||l)&&e.shrinkWrap,isConstrainedSize:o,minSize:c,maxSize:l?g:1000000000,dockBegin:n,dockEnd:i,posProp:t,sizeProp:m,sizePropCap:k,setSize:u}},dockChild:function(b,c,j,d){var e=this,a=b.dockedItems[c.shrinkWrap?j:d],h=a.target,i=h.dock,g;if(i==c.dockBegin){if(c.shrinkWrap){g=e.dockOutwardBegin(b,a,h,c)}else{g=e.dockInwardBegin(b,a,h,c)}}else{if(i==c.dockEnd){if(c.shrinkWrap){g=e.dockOutwardEnd(b,a,h,c)}else{g=e.dockInwardEnd(b,a,h,c)}}else{g=e.dockStretch(b,a,h,c)}}a.dockedAt[c.posProp]=g},dockInwardBegin:function(e,d,c,a){var h=a.begin,g=a.sizeProp,b;if(c.ignoreParentFrame){b=c.dock;h-=e.borderInfo[b]+e.paddingInfo[b]+e.framingInfo[b]}if(!c.overlay){a.begin+=d.getProp(g)+d.getMarginInfo()[g]}return h},dockInwardEnd:function(e,d,c,b){var h=b.sizeProp,a=d.getProp(h)+d.getMarginInfo()[h],g=b.end-a;if(!c.overlay){b.end=g}if(c.ignoreParentFrame){g+=e.borderInfo[c.dock]+e.paddingInfo[c.dock]+e.framingInfo[c.dock]}return g},dockOutwardBegin:function(g,e,d,b){var i=b.begin,h=b.sizeProp,c,a;if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=true}else{if(d.ignoreParentFrame){c=d.dock;i-=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c];b.ignoreFrameBegin=true}}if(!d.overlay){a=e.getProp(h)+e.getMarginInfo()[h];i-=a;b.begin=i}return i},dockOutwardEnd:function(g,e,d,b){var i=b.end,h=b.sizeProp,c,a;a=e.getProp(h)+e.getMarginInfo()[h];if(b.collapsed){b.ignoreFrameBegin=b.ignoreFrameEnd=true}else{if(d.ignoreParentFrame){c=d.dock;i+=g.borderInfo[c]+g.paddingInfo[c]+g.framingInfo[c];b.ignoreFrameEnd=true}}if(!d.overlay){b.end=i+a}return i},dockStretch:function(c,b,n,d){var o=n.dock,j=d.sizeProp,a=o=="top"||o=="bottom",e=b.offsets,i=c.borderInfo,m=c.paddingInfo,h=a?"right":"bottom",q=a?"left":"top",l=d.begin+e[q],g,p,k;if(n.stretch!==false){p=d.end-l-e[h];if(n.ignoreParentFrame){k=c.framingInfo;l-=i[q]+m[q]+k[q];p+=i[j]+m[j]+k[j]}g=b.getMarginInfo();p-=g[j];b[d.setSize](p)}return l},finishAxis:function(a,c){var k=c.end-c.begin,i=c.setSize,b=c.dockBegin,e=c.dockEnd,g=a.borderInfo,j=a.paddingInfo,h=a.framingInfo,d=j[b]+g[b]+h[b];if(c.shrinkWrap){c.delta=-c.begin;a.bodyContext[i](c.initialSize);if(c.ignoreFrameBegin){c.delta-=g[b];a.bodyContext.setProp(c.posProp,-c.begin-d)}else{k+=d;c.delta+=j[b]+h[b];a.bodyContext.setProp(c.posProp,-c.begin)}if(!c.ignoreFrameEnd){k+=j[e]+g[e]+h[e]}c.size=k}else{c.delta=-g[c.dockBegin];a.bodyContext[i](k);a.bodyContext.setProp(c.posProp,c.begin-d)}return !isNaN(k)},finishConstraints:function(e,a,h){var k=a.size<a.minSize,b=a.size>a.maxSize,i=h.size<h.minSize,c=h.size>h.maxSize,d=e.state,j=true,g=this.sizeModels.configured;if(a.shrinkWrap&&b&&h.shrinkWrap&&i){d.constrainedWidth=a.maxSize;e.widthModel=g;j=false}else{if(a.shrinkWrap){if(b){d.constrainedWidth=a.maxSize;e.widthModel=g;j=false}else{if(k){d.constrainedWidth=a.minSize;e.widthModel=g;j=false}}}if(h.shrinkWrap){if(c){d.constrainedHeight=h.maxSize;e.heightModel=g;j=false}else{if(i){d.constrainedHeight=h.minSize;e.heightModel=g;j=false}}}}if(j){if(a.shrinkWrap){e.setWidth(a.size)}if(h.shrinkWrap){e.setHeight(h.size)}}else{e.invalidate({state:{constrainedWidth:d.constrainedWidth,constrainedHeight:d.constrainedHeight}})}return j},finishPositions:function(d,a,h){var j=d.dockedItems,c=j.length,g=a.delta,e=h.delta,i,b;for(i=0;i<c;++i){b=j[i];b.setProp("x",g+b.dockedAt.x);b.setProp("y",e+b.dockedAt.y)}},finishedLayout:function(b){var a=this,c=b.target;a.callParent(arguments);if(!b.animatePolicy){if(b.isCollapsingOrExpanding===1){c.afterCollapse(false)}else{if(b.isCollapsingOrExpanding===2){c.afterExpand(false)}}}},getAnimatePolicy:function(c){var b=this,a,d;if(c.isCollapsingOrExpanding==1){a=b.lastCollapsedState}else{if(c.isCollapsingOrExpanding==2){a=c.lastCollapsedState}}if(a=="left"||a=="right"){d=b.horizontalCollapsePolicy}else{if(a=="top"||a=="bottom"){d=b.verticalCollapsePolicy}}return d},getDockedItems:function(b,l){var g=this,h=g.owner.dockedItems.items,d=h&&h.length&&b!==false,k,j,e,c,a;if(typeof l=="undefined"){j=d?h.slice():h}else{j=[];for(e=0,a=h.length;e<a;++e){k=h[e].dock;c=(k=="top"||k=="left");if(l?c:!c){j.push(h[e])}}d=d&&j.length}if(d){b=b||"render";Ext.Array.sort(j,function(m,i){var n=g.getItemWeight(m,b),o=g.getItemWeight(i,b);if((n!==undefined)&&(o!==undefined)){return n-o}return 0})}return j||[]},getItemWeight:function(b,a){var c=b.weight||this.owner.defaultDockWeights[b.dock];return c[a]||c},getLayoutItems:function(){var e=this,c,d,b,a;if(e.owner.collapsed){a=e.owner.getCollapsedDockedItems()}else{c=e.getDockedItems("visual");d=c.length;a=[];for(b=0;b<d;b++){if(c[b].isVisible(true)){a.push(c[b])}}}return a},measureContentWidth:function(a){return a.bodyContext.el.getWidth()},measureContentHeight:function(a){return a.bodyContext.el.getHeight()},redoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.show()}a.addClsWithUI(a.collapsedCls);c.redo(true)}else{if(c.isCollapsingOrExpanding==2){a.removeClsWithUI(a.collapsedCls);c.bodyContext.redo()}}},renderItems:function(h,e){var a=e.dom.childNodes,d=a.length,g=h.length,l=0,c,b,k,m;for(c=0;c<d;c++){k=Ext.get(a[c]);for(b=0;b<g;b++){m=h[b];if(m.rendered&&(k.id==m.el.id||k.contains(m.el.id))){break}}if(b===g){l++}}for(c=0,b=0;c<g;c++,b++){m=h[c];if(c===b&&(m.dock==="right"||m.dock==="bottom")){b+=l}if(m&&!m.rendered){this.renderItem(m,e,b)}else{if(!this.isValidParent(m,e,b)){this.moveItem(m,e,b)}}}},undoLayout:function(c){var b=this,a=b.owner;if(c.isCollapsingOrExpanding==1){if(a.reExpander){a.reExpander.el.hide()}a.removeClsWithUI(a.collapsedCls);c.undo(true)}else{if(c.isCollapsingOrExpanding==2){a.addClsWithUI(a.collapsedCls);c.bodyContext.undo()}}},sizePolicy:{nostretch:{setsWidth:0,setsHeight:0},stretchH:{setsWidth:1,setsHeight:0},stretchV:{setsWidth:0,setsHeight:1},autoStretchH:{readsWidth:1,setsWidth:1,setsHeight:0},autoStretchV:{readsHeight:1,setsWidth:0,setsHeight:1}},getItemSizePolicy:function(c){var d=this.sizePolicy,b,a;if(c.stretch===false){return d.nostretch}b=c.dock;a=(b=="left"||b=="right");if(a){return d.stretchV}return d.stretchH},configureItem:function(a,b){this.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"docked");a.addClsWithUI("docked-"+a.dock)},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+"-"+a.dock)}var b=a.el.dom;if(!a.destroying&&b){b.parentNode.removeChild(b)}this.childrenChanged=true}});Ext.define("Ext.layout.component.FieldSet",{extend:"Ext.layout.component.Body",alias:["layout.fieldset"],type:"fieldset",beginLayoutCycle:function(a){this.callParent(arguments);if(a.target.collapsed){a.setContentHeight(0)}},calculateOwnerHeightFromContentHeight:function(b,a){return b.getProp("contentHeight")+b.getPaddingInfo().height+(b.target.legend?b.target.legend.getHeight():b.getBorderInfo().top)+b.getBorderInfo().bottom},publishInnerHeight:function(b,a){this.callParent(arguments);if(b.target.legend){b.bodyContext.setHeight(b.bodyContext.getProp("height")-b.target.legend.getHeight(),!b.heightModel.natural)}},getLayoutItems:function(){var a=this.owner.legend;if(a){return[a]}return[]}});Ext.define("Ext.layout.component.ProgressBar",{alias:["layout.progressbar"],extend:"Ext.layout.component.Auto",type:"progressbar",beginLayout:function(d){var b=this,a,c;b.callParent(arguments);if(!d.textEls){c=b.owner.textEl;if(c.isComposite){d.textEls=[];c=c.elements;for(a=c.length;a--;){d.textEls[a]=d.getEl(Ext.get(c[a]))}}else{d.textEls=[d.getEl("textEl")]}}},calculate:function(e){var c=this,a,d,b;c.callParent(arguments);if(Ext.isNumber(b=e.getProp("width"))){b-=e.getBorderInfo().width;d=e.textEls;for(a=d.length;a--;){d[a].setWidth(b)}}else{c.done=false}}});Ext.define("Ext.ProgressBar",{extend:"Ext.Component",alias:"widget.progressbar",requires:["Ext.Template","Ext.CompositeElement","Ext.TaskManager","Ext.layout.component.ProgressBar"],uses:["Ext.fx.Anim"],baseCls:Ext.baseCSSPrefix+"progress",config:{animate:false,text:""},waitTimer:null,childEls:["bar"],renderTpl:['<tpl if="internalText">','<div class="{baseCls}-text {baseCls}-text-back">{text}</div>',"</tpl>",'<div id="{id}-bar" class="{baseCls}-bar" style="width:{percentage}%">','<tpl if="internalText">','<div class="{baseCls}-text">',"<div>{text}</div>","</div>","</tpl>","</div>"],componentLayout:"progressbar",initComponent:function(){this.callParent();this.addEvents("update")},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{internalText:!a.hasOwnProperty("textEl"),text:a.text||"&#160;",percentage:a.value?a.value*100:0})},onRender:function(){var a=this;a.callParent(arguments);if(a.textEl){a.textEl=Ext.get(a.textEl);a.updateText(a.text)}else{a.textEl=a.el.select("."+a.baseCls+"-text")}},updateProgress:function(d,e,a){var c=this,b=c.value;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&&!c.isDestroyed){if(a===true||(a!==false&&c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({from:{width:(b*100)+"%"},to:{width:(c.value*100)+"%"}},c.animate))}else{c.bar.setStyle("width",(c.value*100)+"%")}}c.fireEvent("update",c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},wait:function(c){var b=this,a;if(!b.waitTimer){a=b;c=c||{};b.updateText(c.text);b.waitTimer=Ext.TaskManager.start({run:function(d){var e=c.increment||10;d-=1;b.updateProgress(((((d+e)%e)+1)*(100/e))*0.01,null,c.animate)},interval:c.interval||1000,duration:c.duration,onStop:function(){if(c.fn){c.fn.apply(c.scope||b)}b.reset()},scope:a})}return b},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,"textEl","progressBar")}a.callParent()}});Ext.define("Ext.layout.component.Tab",{extend:"Ext.layout.component.Button",alias:"layout.tab",beginLayout:function(c){var b=this,a=b.owner.closable;if(b.lastClosable!==a){b.lastClosable=a;delete b.adjWidth}b.callParent(arguments)}});Ext.define("Ext.layout.component.field.Field",{extend:"Ext.layout.component.Auto",alias:"layout.field",uses:["Ext.tip.QuickTip","Ext.util.TextMetrics","Ext.util.CSS"],type:"field",beginLayout:function(e){var d=this,a=d.owner,b=e.widthModel,c;d.callParent(arguments);e.labelStrategy=d.getLabelStrategy();e.errorStrategy=d.getErrorStrategy();e.labelContext=e.getEl("labelEl");e.bodyCellContext=e.getEl("bodyEl");e.inputContext=e.getEl("inputEl");e.errorContext=e.getEl("errorEl");e.inputRow=e.getEl("inputRow");if((Ext.isIE6||Ext.isIE7)&&Ext.isStrict&&e.inputContext){var g=e.inputContext.getPaddingInfo().width+e.inputContext.getBorderInfo().width;if(g){Ext.fly(a.inputEl.dom.parentNode).setStyle("padding-right",g+"px")}}e.labelStrategy.prepare(e,a);e.errorStrategy.prepare(e,a);if(b.shrinkWrap){d.beginLayoutShrinkWrap(e)}else{if(b.natural){if(typeof a.size=="number"){d.beginLayoutFixed(e,(c=a.size*6.5+20)+"px")}else{d.beginLayoutShrinkWrap(e)}e.setWidth(c,false)}else{d.beginLayoutFixed(e,"100%")}}},beginLayoutFixed:function(c,b){var a=c.target;a.el.setStyle("table-layout","fixed");a.bodyEl.setStyle("width",b)},beginLayoutShrinkWrap:function(b){var a=b.target;a.el.setStyle("table-layout","auto");a.bodyEl.setStyle("width","")},finishedLayout:function(b){var a=this.owner;this.callParent(arguments);b.labelStrategy.finishedLayout(b,a);b.errorStrategy.finishedLayout(b,a)},calculateOwnerHeightFromContentHeight:function(b,a){return a},measureContentHeight:function(a){return a.el.getHeight()},measureContentWidth:function(a){return a.el.getWidth()},measureLabelErrorHeight:function(a){return a.labelStrategy.getHeight(a)+a.errorStrategy.getHeight(a)},publishInnerWidth:function(b,a){if(b.target.isContainer){var c=b.bodyCellContext;c.setWidth(c.el.getWidth(),false)}},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&&Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var a={prepare:function(e,b){var c=b.labelCls+"-"+b.labelAlign,d=b.labelEl;if(d){d.addCls(c)}},getHeight:function(){return 0},finishedLayout:Ext.emptyFn};return{base:a,top:Ext.applyIf({prepare:function(d,b){a.prepare(d,b);var c=b.labelEl;d.hasHiddenLabel=c&&!b.hideEmptyLabel&&!b.getFieldLabel();if(d.hasHiddenLabel){c.dom.innerHTML="&#160;"}},getHeight:function(e){var d=e.labelContext,c=d.getProp("height"),b=e.hasHiddenLabel;if(c===undefined||b){c=d.el.getHeight();if(b){d.setHeight(c)}}return c},finishedLayout:function(c,b){if(c.hasHiddenLabel){b.labelEl.dom.innerHTML=""}}},a),left:a,right:a}})(),errorStrategies:(function(){function d(h){var i=Ext.layout.component.field.Field.tip,j;if(i&&i.isVisible()){j=i.activeTarget;if(j&&j.el===h.getActionEl().dom){i.toFront(true)}}}var c=Ext.applyIf,b=Ext.emptyFn,a=Ext.baseCSSPrefix+"form-invalid-icon",g,e={prepare:function(j,h){var i=h.errorEl;if(i){i.setDisplayed(false)}},getHeight:function(){return 0},onFocus:b,finishedLayout:b};return{none:e,side:c({prepare:function(i,h){var j=h.errorEl;if(!g){g=parseInt(Ext.util.CSS.getRule("."+a).style.width,10)}j.addCls(a);j.set({"data-errorqtip":h.getActiveError()||""});j.setDisplayed(h.hasActiveError());h.bodyEl.dom.colSpan=h.getBodyColspan();Ext.layout.component.field.Field.initTip()},onFocus:d},e),under:c({prepare:function(j,h){var k=h.errorEl,i=Ext.baseCSSPrefix+"form-invalid-under";k.addCls(i);k.setDisplayed(h.hasActiveError())},getHeight:function(k){var h=0,i,j;if(k.target.hasActiveError()){i=k.errorContext;j=i.props;h=j.height;if(h===undefined){j.height=h=i.el.getHeight()}}return h}},e),qtip:c({prepare:function(i,h){Ext.layout.component.field.Field.initTip();h.getActionEl().set({"data-errorqtip":h.getActiveError()||""})},onFocus:d},e),title:c({prepare:function(i,h){h.el.set({title:h.getActiveError()||""})}},e),elementId:c({prepare:function(i,h){var j=Ext.fly(h.msgTarget);if(j){j.dom.innerHTML=h.getActiveError()||"";j.setDisplayed(h.hasActiveError())}}},e)}})(),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create("Ext.tip.QuickTip",{baseCls:Ext.baseCSSPrefix+"form-invalid-tip"});a.tagConfig=Ext.apply({},{attribute:"errorqtip"},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define("Ext.form.field.Base",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.field",alternateClassName:["Ext.form.Field","Ext.form.BaseField"],requires:["Ext.util.DelayedTask","Ext.XTemplate","Ext.layout.component.field.Field"],fieldSubTpl:['<input id="{id}" type="{type}" {inputAttrTpl}',' size="1"','<tpl if="name"> name="{name}"</tpl>','<tpl if="value"> value="{value}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls} {editableCls}" autocomplete="off"/>',{disableFormats:true}],subTplInsertions:["inputAttrTpl"],inputType:"text",invalidText:"The value in this field is invalid",fieldCls:Ext.baseCSSPrefix+"form-field",focusCls:"form-focus",dirtyCls:Ext.baseCSSPrefix+"form-dirty",checkChangeEvents:Ext.isIE&&(!document.documentMode||document.documentMode<9)?["change","propertychange"]:["change","input","textInput","keyup","dragdrop"],checkChangeBuffer:50,componentLayout:"field",readOnly:false,readOnlyCls:Ext.baseCSSPrefix+"form-readonly",validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+"field",maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents("specialkey","writeablechange");a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},getInputId:function(){return this.inputId||(this.inputId=this.id+"-inputEl")},getSubTplData:function(){var d=this,c=d.inputType,b=d.getInputId(),a=[],e;if(d.cls){a.push(d.cls)}if(d.readOnly){a.push(d.readOnlyCls)}e=Ext.apply({id:b,cmpId:d.id,name:d.name||b,disabled:d.disabled,readOnly:false,value:d.getRawValue(),type:c,cls:a.join(" "),fieldCls:d.fieldCls,fieldStyle:d.getFieldStyle(),tabIdx:d.tabIndex,typeCls:Ext.baseCSSPrefix+"form-"+(c==="password"?"text":c)},d.subTplData);d.getInsertionRenderData(e,d.subTplInsertions);return e},afterFirstLayout:function(){this.callParent();var a=this.inputEl;if(a){a.selectable()}},applyRenderSelectors:function(){var a=this;a.callParent();a.inputEl=a.el.getById(a.getInputId())},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},getFieldStyle:function(){return"width:100%;"+(Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||"")},onRender:function(){var a=this;a.callParent(arguments);a.renderActiveError()},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType==="file"},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&&a.submitValue&&!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,""));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(b,"");a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},valueToRaw:function(a){return""+Ext.value(a,"")},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true;if(a.hasActiveError()){a.clearInvalid();a.needsValidateOnEnable=true}}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false;if(a.needsValidateOnEnable){delete a.needsValidateOnEnable;a.forceValidation=true;a.isValid();delete a.forceValidation}}},setReadOnly:function(c){var a=this,b=a.inputEl;c=!!c;a[c?"addCls":"removeCls"](a.readOnlyCls);a.readOnly=c;if(b){b.dom.readOnly=c}a.fireEvent("writeablechange",a,c)},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,new Ext.EventObjectImpl(a))}},initEvents:function(){var b=this,c=b.inputEl,a,d;if(b.inEditor){b.onBlur=Ext.Function.createBuffered(b.onBlur,10)}if(c){b.mon(c,Ext.EventManager.getKeyEvent(),b.fireKey,b);a=new Ext.util.DelayedTask(b.checkChange,b);b.onChangeEvent=d=function(){a.delay(b.checkChangeBuffer)};Ext.each(b.checkChangeEvents,function(e){if(e==="propertychange"){b.usesPropertychange=true}b.mon(c,e,d)},b)}b.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b="propertychange",e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},onDirtyChange:function(a){this[a?"addCls":"removeCls"](this.dirtyCls)},isValid:function(){var b=this,a=b.disabled,c=b.forceValidation||!a;return c?b.validateValue(b.processRawValue(b.getRawValue())):a},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.updateLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.updateLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?"addCls":"removeCls"](b.invalidCls+"-field")}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define("Ext.form.field.Checkbox",{extend:"Ext.form.field.Base",alias:["widget.checkboxfield","widget.checkbox"],alternateClassName:"Ext.form.Checkbox",requires:["Ext.XTemplate","Ext.form.CheckboxManager"],componentLayout:"field",childEls:["boxLabelEl"],fieldSubTpl:["<tpl if=\"boxLabel && boxLabelAlign == 'before'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",'<input type="button" id="{id}" {inputAttrTpl}','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' class="{fieldCls} {typeCls}" autocomplete="off" hidefocus="true" />',"<tpl if=\"boxLabel && boxLabelAlign == 'after'\">","{beforeBoxLabelTpl}",'<label id="{cmpId}-boxLabelEl" {boxLabelAttrTpl} class="{boxLabelCls} {boxLabelCls}-{boxLabelAlign}" for="{id}">',"{beforeBoxLabelTextTpl}","{boxLabel}","{afterBoxLabelTextTpl}","</label>","{afterBoxLabelTpl}","</tpl>",{disableFormats:true,compiled:true}],subTplInsertions:["beforeBoxLabelTpl","afterBoxLabelTpl","beforeBoxLabelTextTpl","afterBoxLabelTextTpl","boxLabelAttrTpl","inputAttrTpl"],isCheckbox:true,focusCls:Ext.baseCSSPrefix+"form-cb-focus",fieldBodyCls:Ext.baseCSSPrefix+"form-cb-wrap",checked:false,checkedCls:Ext.baseCSSPrefix+"form-cb-checked",boxLabelCls:Ext.baseCSSPrefix+"form-cb-label",boxLabelAlign:"after",inputValue:"on",checkChangeEvents:[],inputType:"checkbox",onRe:/^on$/i,initComponent:function(){this.callParent(arguments);this.getManager().add(this)},initValue:function(){var b=this,a=!!b.checked;b.originalValue=b.lastValue=a;b.setValue(a)},getElConfig:function(){var a=this;if(a.isChecked(a.rawValue,a.inputValue)){a.addCls(a.checkedCls)}return a.callParent()},getFieldStyle:function(){return Ext.isObject(this.fieldStyle)?Ext.DomHelper.generateStyles(this.fieldStyle):this.fieldStyle||""},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{disabled:a.readOnly||a.disabled,boxLabel:a.boxLabel,boxLabelCls:a.boxLabelCls,boxLabelAlign:a.boxLabelAlign})},initEvents:function(){var a=this;a.callParent();a.mon(a.inputEl,"click",a.onBoxClick,a)},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(!this.checked)}},getRawValue:function(){return this.checked},getValue:function(){return this.checked},getSubmitValue:function(){var a=this.uncheckedValue,b=Ext.isDefined(a)?a:null;return this.checked?this.inputValue:b},isChecked:function(b,a){return(b===true||b==="true"||b==="1"||b===1||(((Ext.isString(b)||Ext.isNumber(b))&&a)?b==a:this.onRe.test(b)))},setRawValue:function(c){var b=this,d=b.inputEl,a=b.isChecked(c,b.inputValue);if(d){b[a?"addCls":"removeCls"](b.checkedCls)}b.checked=b.rawValue=a;return a},setValue:function(b){var a=this;if(Ext.isArray(b)){a.getManager().getByName(a.name).each(function(c){c.setValue(Ext.Array.contains(b,c.inputValue))})}else{a.callParent(arguments)}return a},valueToRaw:function(a){return a},onChange:function(b,a){var d=this,c=d.handler;if(c){c.call(d.scope||d,d,b)}d.callParent(arguments)},beforeDestroy:function(){this.callParent();this.getManager().removeAtKey(this.id)},getManager:function(){return Ext.form.CheckboxManager},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=a.readOnly}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.disabled=!!c||a.disabled}a.callParent(arguments)}});Ext.define("Ext.form.field.Display",{extend:"Ext.form.field.Base",alias:"widget.displayfield",requires:["Ext.util.Format","Ext.XTemplate"],alternateClassName:["Ext.form.DisplayField","Ext.form.Display"],fieldSubTpl:['<div id="{id}" class="{fieldCls}">{value}</div>',{compiled:true,disableFormats:true}],fieldCls:Ext.baseCSSPrefix+"form-display-field",htmlEncode:false,validateOnChange:false,initEvents:Ext.emptyFn,submitValue:false,isDirty:function(){return false},isValid:function(){return true},validate:function(){return true},getRawValue:function(){return this.rawValue},setRawValue:function(b){var a=this,c;b=Ext.value(b,"");a.rawValue=b;if(a.rendered){a.inputEl.dom.innerHTML=a.getDisplayValue()}return b},getDisplayValue:function(){var a=this,b=this.getRawValue(),c;if(a.renderer){c=a.renderer.call(a.scope||a,b,a)}else{c=a.htmlEncode?Ext.util.Format.htmlEncode(b):b}return c},getSubTplData:function(){var a=this.callParent(arguments);a.value=this.getDisplayValue();return a}});Ext.define("Ext.form.field.Hidden",{extend:"Ext.form.field.Base",alias:["widget.hiddenfield","widget.hidden"],alternateClassName:"Ext.form.Hidden",inputType:"hidden",hideLabel:true,initComponent:function(){this.formItemCls+="-hidden";this.callParent()},isEqual:function(b,a){return this.isEqualAsString(b,a)},initEvents:Ext.emptyFn,setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define("Ext.form.field.Radio",{extend:"Ext.form.field.Checkbox",alias:["widget.radiofield","widget.radio"],alternateClassName:"Ext.form.Radio",requires:["Ext.form.RadioManager"],isRadio:true,inputType:"radio",ariaRole:"radio",formId:null,getGroupValue:function(){var a=this.getManager().getChecked(this.name,this.getFormId());return a?a.inputValue:null},onBoxClick:function(b){var a=this;if(!a.disabled&&!a.readOnly){this.setValue(true)}},getFormId:function(){var b=this,a;if(!b.formId){a=b.up("form");if(a){b.formId=a.id}}return b.formId},onRemoved:function(){this.callParent(arguments);this.formId=null},setValue:function(a){var b=this,c;if(Ext.isBoolean(a)){b.callParent(arguments)}else{c=b.getManager().getWithValue(b.name,a,b.getFormId()).getAt(0);if(c){c.setValue(true)}}return b},getSubmitValue:function(){return this.checked?this.inputValue:null},getModelData:function(){return this.getSubmitData()},onChange:function(b,a){var c=this;c.callParent(arguments);if(b){c.getManager().getByName(c.name,c.getFormId()).each(function(d){if(d!==c){d.setValue(false)}},c)}},getManager:function(){return Ext.form.RadioManager}});Ext.define("Ext.layout.component.field.FieldContainer",{extend:"Ext.layout.component.field.Field",alias:"layout.fieldcontainer",type:"fieldcontainer",waitForOuterHeightInDom:true,waitForOuterWidthInDom:true,beginLayout:function(a){this.callParent(arguments);a.hasRawContent=true}});Ext.define("Ext.layout.component.field.HtmlEditor",{extend:"Ext.layout.component.field.Field",alias:["layout.htmleditor"],type:"htmleditor",toolbarSizePolicy:{setsWidth:1,setsHeight:0},beginLayout:function(a){this.callParent(arguments);a.textAreaContext=a.getEl("textareaEl");a.iframeContext=a.getEl("iframeEl");a.toolbarContext=a.context.getCmp(this.owner.getToolbar())},getItemSizePolicy:function(a){return this.toolbarSizePolicy},getLayoutItems:function(){return[this.owner.getToolbar()]},getRenderTarget:function(){return this.owner.bodyEl},publishInnerHeight:function(c,a){var b=this,d=a-b.measureLabelErrorHeight(c)-c.toolbarContext.getProp("height")-c.bodyCellContext.getPaddingInfo().height;if(Ext.isNumber(d)){c.textAreaContext.setHeight(d);c.iframeContext.setHeight(d)}else{b.done=false}},publishInnerWidth:function(c,b){var a=b-c.bodyCellContext.getFrameInfo().width;c.toolbarContext.setWidth(a)}});Ext.define("Ext.layout.component.field.Slider",{alias:["layout.sliderfield"],extend:"Ext.layout.component.field.Field",type:"sliderfield",beginLayout:function(a){this.callParent(arguments);a.endElContext=a.getEl("endEl");a.innerElContext=a.getEl("innerEl");a.bodyElContext=a.getEl("bodyEl")},publishInnerHeight:function(d,a){var e=a-this.measureLabelErrorHeight(d),c,b;if(this.owner.vertical){c=d.endElContext.getPaddingInfo();b=d.inputContext.getPaddingInfo();d.innerElContext.setHeight(e-b.height-c.height)}else{d.bodyElContext.setHeight(e)}},publishInnerWidth:function(d,c){if(!this.owner.vertical){var b=d.endElContext.getPaddingInfo(),a=d.inputContext.getPaddingInfo();d.innerElContext.setWidth(c-a.left-b.right-d.labelContext.getProp("width"))}}});Ext.define("Ext.layout.component.field.Text",{extend:"Ext.layout.component.field.Field",alias:"layout.textfield",requires:["Ext.util.TextMetrics"],type:"textfield",measureContentWidth:function(c){var h=this,b=h.owner,a=h.callParent(arguments),g=c.inputContext,k,j,d,i,e;if(b.grow){k=b.inputEl;j=(k.dom.value||(b.hasFocus?"":b.emptyText)||"")+b.growAppend;d=k.getTextWidth(j)+g.getFrameInfo().width;i=b.growMax;e=Math.min(i,a);i=Math.max(b.growMin,i,e);d=Ext.Number.constrain(d,b.growMin,i);if(a!=d){a=g.setWidth(d)}}return a}});Ext.define("Ext.form.field.Text",{extend:"Ext.form.field.Base",alias:"widget.textfield",requires:["Ext.form.field.VTypes","Ext.layout.component.field.Text"],alternateClassName:["Ext.form.TextField","Ext.form.Text"],size:20,growMin:30,growMax:800,growAppend:"W",allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",blankText:"This field is required",regexText:"",emptyCls:Ext.baseCSSPrefix+"form-empty-field",componentLayout:"textfield",initComponent:function(){var a=this;a.callParent();a.addEvents("autosize","keydown","keyup","keypress");if(a.grow){a.shrinkWrap|=1}},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,"mousedown",b.onMouseDown,b)}if(b.maskRe||(b.vtype&&b.disableKeyFilter!==true&&(b.maskRe=Ext.form.field.VTypes[b.vtype+"Mask"]))){b.mon(a,"keypress",b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},getSubTplData:function(){var a=this,b=a.getRawValue(),d=a.emptyText&&b.length<1,c;if(d){if(Ext.supports.Placeholder){c=a.emptyText}else{b=a.emptyText}}return Ext.apply(a.callParent(),{maxLength:a.enforceMaxLength?a.maxLength:undefined,readOnly:a.readOnly,placeholder:c,value:b,fieldCls:a.fieldCls+((d&&(c||b))?" "+a.emptyCls:"")})},afterRender:function(){this.autoSize();this.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,"mouseup",Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,"");if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable="on"}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=""}},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&&a){c=b.getRawValue().length<1&&!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a)}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},afterFirstLayout:function(){this.callParent();if(Ext.isIE&&this.disabled){var a=this.inputEl;if(a){a.dom.unselectable="on"}}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;b.callParent(arguments);if(a&&!Ext.supports.Placeholder&&c.dom.value===a){b.setRawValue("");d=true;c.removeCls(b.emptyCls)}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.callParent(arguments);this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&&!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if(Ext.isGecko&&(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&&c.button===-1))){return}if(!Ext.isGecko&&c.isSpecialKey()&&!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText){a=""}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&&a.emptyText&&!Ext.isEmpty(b)){c.removeCls(a.emptyCls)}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(l){var g=this,k=g.callParent(arguments),a=g.validator,d=g.emptyText,c=g.allowBlank,e=g.vtype,h=Ext.form.field.VTypes,i=g.regex,j=Ext.String.format,b;l=l||g.processRawValue(g.getRawValue());if(Ext.isFunction(a)){b=a.call(g,l);if(b!==true){k.push(b)}}if(l.length<1||l===d){if(!c){k.push(g.blankText)}return k}if(l.length<g.minLength){k.push(j(g.minLengthText,g.minLength))}if(l.length>g.maxLength){k.push(j(g.maxLengthText,g.maxLength))}if(e){if(!h[e](l,g)){k.push(g.vtypeText||h[e+"Text"])}}if(i&&!i.test(l)){k.push(g.regexText||g.invalidText)}return k},selectText:function(i,a){var h=this,c=h.getRawValue(),d=true,g=h.inputEl.dom,e,b;if(c.length>0){i=i===e?0:i;a=a===e?c.length:a;if(g.setSelectionRange){g.setSelectionRange(i,a)}else{if(g.createTextRange){b=g.createTextRange();b.moveStart("character",i);b.moveEnd("character",a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){h.focus()}},autoSize:function(){var a=this;if(a.grow&&a.rendered){a.autoSizing=true;a.updateLayout()}},afterComponentLayout:function(){var b=this,a;b.callParent();if(b.autoSizing){a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent("autosize",b,a);b.lastInputWidth=a;delete b.autoSizing}}}});Ext.define("Ext.layout.component.field.TextArea",{extend:"Ext.layout.component.field.Text",alias:"layout.textareafield",type:"textareafield",measureContentHeight:function(b){var e=this,a=e.owner,k=e.callParent(arguments),c,i,h,g,d,j;if(a.grow){c=b.inputContext;i=a.inputEl;d=i.getWidth(true);h=i.dom.value||"&#160;";h+=a.growAppend;h=h.replace(/\n/g,"<br>");j=Ext.util.TextMetrics.measure(i,h,d).height+c.getBorderInfo().height+c.getPaddingInfo().height;j=Ext.Number.constrain(j,a.growMin,a.growMax);if(k!=j){k=c.setHeight(j)}}return k},publishInnerHeight:function(b,a){b.inputContext.setHeight(a-this.measureLabelErrorHeight(b))}});Ext.define("Ext.form.field.TextArea",{extend:"Ext.form.field.Text",alias:["widget.textareafield","widget.textarea"],alternateClassName:"Ext.form.TextArea",requires:["Ext.XTemplate","Ext.layout.component.field.TextArea","Ext.util.DelayedTask"],fieldSubTpl:['<textarea id="{id}" {inputAttrTpl}','<tpl if="name"> name="{name}"</tpl>','<tpl if="rows"> rows="{rows}" </tpl>','<tpl if="cols"> cols="{cols}" </tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>',' class="{fieldCls} {typeCls}" ','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>',' autocomplete="off">','<tpl if="value">{value}</tpl>',"</textarea>",{compiled:true,disableFormats:true}],growMin:60,growMax:1000,growAppend:"\n-",cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:"textareafield",getSubTplData:function(){var c=this,b=c.getFieldStyle(),a=c.callParent();if(c.grow){if(c.preventScrollbars){a.fieldStyle=(b||"")+";overflow:hidden;height:"+c.growMin+"px"}}Ext.applyIf(a,{cols:c.cols,rows:c.rows});return a},afterRender:function(){var a=this;a.callParent(arguments);a.needsMaxCheck=a.enforceMaxLength&&!Ext.supports.TextAreaMaxLength;if(a.needsMaxCheck){a.inputEl.on("paste",a.onPaste,a)}},onPaste:function(b){var a=this;if(!a.pasteTask){a.pasteTask=new Ext.util.DelayedTask(a.pasteCheck,a)}a.pasteTask.delay(1)},pasteCheck:function(){var b=this,c=b.getValue(),a=b.maxLength;if(c.length>a){c=c.substr(0,a);b.setValue(c)}},fireKey:function(c){var a=this,b;if(c.isSpecialKey()&&(a.enterIsSpecial||(c.getKey()!==c.ENTER||c.hasModifier()))){a.fireEvent("specialkey",a,c)}if(a.needsMaxCheck){b=a.getValue();if(b.length>=a.maxLength){c.stopEvent()}}},autoSize:function(){var b=this,a;if(b.grow&&b.rendered){b.doComponentLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent("autosize",b,a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute("aria-multiline",true)},beforeDestroy:function(){var a=this.pasteTask;if(a){a.delay()}this.callParent()}});Ext.define("Ext.layout.component.field.Trigger",{alias:"layout.triggerfield",extend:"Ext.layout.component.field.Field",type:"triggerfield",beginLayout:function(d){var c=this,a=c.owner,b;d.triggerWrap=d.getEl("triggerWrap");c.callParent(arguments);b=a.getTriggerStateFlags();if(b!=a.lastTriggerStateFlags){a.lastTriggerStateFlags=b;c.updateEditState()}},beginLayoutFixed:function(c,b){var a=c.target;this.callParent(arguments);a.inputCell.setStyle("width","100%");a.inputEl.setStyle("width","100%");a.triggerWrap.setStyle("width",b);a.triggerWrap.setStyle("table-layout","fixed")},beginLayoutShrinkWrap:function(b){var a=b.target,c="";this.callParent(arguments);a.triggerWrap.setStyle("width",c);a.inputCell.setStyle("width",c);a.inputEl.setStyle("width",c);a.triggerWrap.setStyle("table-layout","auto")},updateEditState:function(){var c=this,a=c.owner,e=a.inputEl,d=Ext.baseCSSPrefix+"trigger-noedit",b,g;if(c.owner.readOnly){e.addCls(d);g=true;b=false}else{if(c.owner.editable){e.removeCls(d);g=false}else{e.addCls(d);g=true}b=!c.owner.hideTrigger}a.triggerWrap.setDisplayed(b);e.dom.readOnly=g}});Ext.define("Ext.form.field.Trigger",{extend:"Ext.form.field.Text",alias:["widget.triggerfield","widget.trigger"],requires:["Ext.DomHelper","Ext.util.ClickRepeater","Ext.layout.component.field.Trigger"],alternateClassName:["Ext.form.TriggerField","Ext.form.TwinTriggerField","Ext.form.Trigger"],childEls:[{name:"triggerCell",select:"."+Ext.baseCSSPrefix+"trigger-cell"},{name:"triggerEl",select:"."+Ext.baseCSSPrefix+"form-trigger"},"triggerWrap","inputCell"],triggerBaseCls:Ext.baseCSSPrefix+"form-trigger",triggerWrapCls:Ext.baseCSSPrefix+"form-trigger-wrap",hideTrigger:false,editable:true,readOnly:false,repeatTriggerClick:false,autoSize:Ext.emptyFn,monitorTab:true,mimicing:false,triggerIndexRe:/trigger-index-(\d+)/,componentLayout:"triggerfield",initComponent:function(){var a=this;if(!a.triggerWidth){Ext.form.field.Trigger.prototype.triggerWidth=parseInt(Ext.util.CSS.getRule("."+Ext.baseCSSPrefix+"form-trigger").style.width,10)}a.wrapFocusCls=a.triggerWrapCls+"-focus";a.callParent(arguments)},getSubTplMarkup:function(){var a=this,b=a.callParent(arguments);return'<table id="'+a.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+a.id+'-inputCell">'+b+"</td>"+a.getTriggerMarkup()+"</tr></tbody></table>"},getLabelableRenderData:function(){var b=this,c=b.triggerWrapCls,a=b.callParent(arguments);b.subTplData.readOnly=(b.editable===false||b.readOnly===true);return Ext.applyIf(a,{editableCls:(b.readOnly||!b.editable)?" "+Ext.baseCSSPrefix+"trigger-noedit":"",triggerWrapCls:c,triggerMarkup:b.getTriggerMarkup()})},getTriggerMarkup:function(){var c=this,b=0,d=(c.readOnly||c.hideTrigger),g,e=c.triggerBaseCls,a=[];if(!c.trigger1Cls){c.trigger1Cls=c.triggerCls}for(b=0;(g=c["trigger"+(b+1)+"Cls"])||b<1;b++){a.push({tag:"td",valign:"top",cls:Ext.baseCSSPrefix+"trigger-cell",style:"width:"+c.triggerWidth+(d?"px;display:none":"px"),cn:{cls:[Ext.baseCSSPrefix+"trigger-index-"+b,e,g].join(" "),role:"button"}})}a[b-1].cn.cls+=" "+e+"-last";return Ext.DomHelper.markup(a)},beforeRender:function(){var a=this,b=a.triggerBaseCls;a.callParent();if(b!=Ext.baseCSSPrefix+"form-trigger"){a.addChildEls({name:"triggerEl",select:"."+b})}a.lastTriggerStateFlags=a.getTriggerStateFlags()},onRender:function(){var a=this;a.callParent(arguments);a.doc=Ext.getDoc();a.initTrigger();a.updateEditState();a.triggerEl.unselectable()},updateEditState:function(){var b=this,d=b.inputEl,e=b.triggerCell,c=Ext.baseCSSPrefix+"trigger-noedit",a,g;if(b.rendered){if(b.readOnly){d.addCls(c);g=true;a=false}else{if(b.editable){d.removeCls(c);g=false}else{d.addCls(c);g=true}a=!b.hideTrigger}e.setDisplayed(a);d.dom.readOnly=g}},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerEl.getCount()*b.triggerWidth}return a},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},initTrigger:function(){var c=this,a=c.triggerWrap,b=c.triggerEl;if(c.repeatTriggerClick){c.triggerRepeater=new Ext.util.ClickRepeater(a,{preventDefault:true,handler:c.onTriggerWrapClick,scope:c})}else{c.mon(a,"click",c.onTriggerWrapClick,c)}b.setVisibilityMode(Ext.Element.DISPLAY);b.addClsOnOver(c.triggerBaseCls+"-over");b.each(function(e,g,d){e.addClsOnOver(c["trigger"+(d+1)+"Cls"]+"-over")});b.addClsOnClick(c.triggerBaseCls+"-click");b.each(function(e,g,d){e.addClsOnClick(c["trigger"+(d+1)+"Cls"]+"-click")})},onDestroy:function(){var a=this;Ext.destroyMembers(a,"triggerRepeater","triggerWrap","triggerEl");delete a.doc;a.callParent()},onFocus:function(){var a=this;a.callParent(arguments);if(!a.mimicing){a.bodyEl.addCls(a.wrapFocusCls);a.mimicing=true;a.mon(a.doc,"mousedown",a.mimicBlur,a,{delay:10});if(a.monitorTab){a.on("specialkey",a.checkTab,a)}}},checkTab:function(a,b){if(!this.ignoreMonitorTab&&b.getKey()==b.TAB){this.triggerBlur()}},getTriggerStateFlags:function(){var a=this,b=0;if(a.readOnly){b+=1}if(a.editable){b+=2}if(a.hideTrigger){b+=4}return b},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.bodyEl.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){var a=this;a.mimicing=false;a.mun(a.doc,"mousedown",a.mimicBlur,a);if(a.monitorTab&&a.inputEl){a.un("specialkey",a.checkTab,a)}Ext.form.field.Trigger.superclass.onBlur.call(a);if(a.bodyEl){a.bodyEl.removeCls(a.wrapFocusCls)}},validateBlur:function(a){return true},onTriggerWrapClick:function(){var d=this,e,b,a,c;c=arguments[d.triggerRepeater?1:0];if(c&&!d.readOnly&&!d.disabled){e=c.getTarget("."+d.triggerBaseCls,null);b=e&&e.className.match(d.triggerIndexRe);if(b){a=d["onTrigger"+(parseInt(b[1],10)+1)+"Click"]||d.onTriggerClick;if(a){a.call(d,c)}}}},onTriggerClick:Ext.emptyFn});Ext.define("Ext.form.field.File",{extend:"Ext.form.field.Trigger",alias:["widget.filefield","widget.fileuploadfield"],alternateClassName:["Ext.form.FileUploadField","Ext.ux.form.FileUploadField","Ext.form.File"],uses:["Ext.button.Button","Ext.layout.component.field.Field"],buttonText:"Browse...",buttonOnly:false,buttonMargin:3,fieldBodyCls:Ext.baseCSSPrefix+"form-file-wrap",readOnly:true,componentLayout:"triggerfield",childEls:["fileInputEl","buttonEl","buttonEl-btnEl","browseButtonWrap"],onRender:function(){var a=this,b;a.callParent(arguments);b=a.inputEl;b.dom.name="";a.fileInputEl.dom.name=a.getName();a.fileInputEl.on({scope:a,change:a.onFileChange});if(a.buttonOnly){a.inputCell.setDisplayed(false)}a.browseButtonWrap.dom.style.width=(a.browseButtonWrap.dom.lastChild.offsetWidth+a.buttonEl.getMargin("lr"))+"px";if(Ext.isIE){a.buttonEl.repaint()}},getTriggerMarkup:function(){var d=this,a,c=Ext.widget("button",Ext.apply({id:d.id+"-buttonEl",ui:d.ui,disabled:d.disabled,text:d.buttonText,cls:Ext.baseCSSPrefix+"form-file-btn",preventDefault:false,style:d.buttonOnly?"":"margin-left:"+d.buttonMargin+"px"},d.buttonConfig)),b=c.getRenderTree(),e={id:d.id+"-fileInputEl",cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1};if(d.disabled){e.cn.disabled=true}b.cn=e;a='<td id="'+d.id+'-browseButtonWrap">'+Ext.DomHelper.markup(b)+"</td>";c.destroy();return a},createFileInput:function(){var a=this;a.fileInputEl=a.buttonEl.createChild({name:a.getName(),id:a.id+"-fileInputEl",cls:Ext.baseCSSPrefix+"form-file-input",tag:"input",type:"file",size:1});a.fileInputEl.on({scope:a,change:a.onFileChange})},onFileChange:function(){this.lastValue=null;Ext.form.field.File.superclass.setValue.call(this,this.fileInputEl.dom.value)},setValue:Ext.emptyFn,reset:function(){var a=this;if(a.rendered){a.fileInputEl.remove();a.createFileInput();a.inputEl.dom.value=""}a.callParent()},onDisable:function(){this.callParent();this.disableItems()},disableItems:function(){var a=this.fileInputEl;if(a){a.dom.disabled=true}this["buttonEl-btnEl"].dom.disabled=true},onEnable:function(){var a=this;a.callParent();a.fileInputEl.dom.disabled=false;this["buttonEl-btnEl"].dom.disabled=true},isFileUpload:function(){return true},extractFileInput:function(){var a=this.fileInputEl.dom;this.reset();return a},onDestroy:function(){Ext.destroyMembers(this,"fileInputEl","buttonEl");this.callParent()}});Ext.define("Ext.form.field.Picker",{extend:"Ext.form.field.Trigger",alias:"widget.pickerfield",alternateClassName:"Ext.form.Picker",requires:["Ext.util.KeyNav"],matchFieldWidth:true,pickerAlign:"tl-bl?",openCls:Ext.baseCSSPrefix+"pickerfield-open",editable:true,initComponent:function(){this.callParent();this.addEvents("expand","collapse","select")},initEvents:function(){var a=this;a.callParent();a.keyNav=new Ext.util.KeyNav(a.inputEl,{down:a.onDownArrow,esc:{handler:a.onEsc,scope:a,defaultEventAction:false},scope:a,forceKeyDown:true});if(!a.editable){a.mon(a.inputEl,"click",a.onTriggerClick,a)}if(Ext.isGecko){a.inputEl.dom.setAttribute("autocomplete","off")}},onEsc:function(a){if(!Ext.FocusManager||!Ext.FocusManager.enabled){a.stopEvent()}this.collapse()},onDownArrow:function(a){if(!this.isExpanded){this.onTriggerClick()}},expand:function(){var c=this,a,b,d;if(c.rendered&&!c.isExpanded&&!c.isDestroyed){a=c.bodyEl;b=c.getPicker();d=c.collapseIf;b.show();c.isExpanded=true;c.alignPicker();a.addCls(c.openCls);c.mon(Ext.getDoc(),{mousewheel:d,mousedown:d,scope:c});Ext.EventManager.onWindowResize(c.alignPicker,c);c.fireEvent("expand",c);c.onExpand()}},onExpand:Ext.emptyFn,alignPicker:function(){var b=this,a=b.getPicker();if(b.isExpanded){if(b.matchFieldWidth){a.setWidth(b.bodyEl.getWidth())}if(a.isFloating()){b.doAlign()}}},doAlign:function(){var d=this,c=d.picker,a="-above",b;d.picker.alignTo(d.inputEl,d.pickerAlign,d.pickerOffset);b=c.el.getY()<d.inputEl.getY();d.bodyEl[b?"addCls":"removeCls"](d.openCls+a);c[b?"addCls":"removeCls"](c.baseCls+a)},collapse:function(){if(this.isExpanded&&!this.isDestroyed){var d=this,c=d.openCls,b=d.picker,e=Ext.getDoc(),g=d.collapseIf,a="-above";b.hide();d.isExpanded=false;d.bodyEl.removeCls([c,c+a]);b.el.removeCls(b.baseCls+a);e.un("mousewheel",g,d);e.un("mousedown",g,d);Ext.EventManager.removeResizeListener(d.alignPicker,d);d.fireEvent("collapse",d);d.onCollapse()}},onCollapse:Ext.emptyFn,collapseIf:function(b){var a=this;if(!a.isDestroyed&&!b.within(a.bodyEl,false,true)&&!b.within(a.picker.el,false,true)){a.collapse()}},getPicker:function(){var a=this;return a.picker||(a.picker=a.createPicker())},createPicker:Ext.emptyFn,onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.expand()}a.inputEl.focus()}},mimicBlur:function(c){var b=this,a=b.picker;if(!a||!c.within(a.el,false,true)){b.callParent(arguments)}},onDestroy:function(){var b=this,a=b.picker;Ext.EventManager.removeResizeListener(b.alignPicker,b);Ext.destroy(b.keyNav);if(a){delete a.pickerField;a.destroy()}b.callParent()}});Ext.define("Ext.form.field.Spinner",{extend:"Ext.form.field.Trigger",alias:"widget.spinnerfield",alternateClassName:"Ext.form.Spinner",requires:["Ext.util.KeyNav"],trigger1Cls:Ext.baseCSSPrefix+"form-spinner-up",trigger2Cls:Ext.baseCSSPrefix+"form-spinner-down",spinUpEnabled:true,spinDownEnabled:true,keyNavEnabled:true,mouseWheelEnabled:true,repeatTriggerClick:true,onSpinUp:Ext.emptyFn,onSpinDown:Ext.emptyFn,triggerTpl:'<td style="{triggerStyle}" valign="top"><div class="'+Ext.baseCSSPrefix+"trigger-index-0 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-up role="button"></div></td></tr><tr><td style="{triggerStyle}" valign="top"><div class="'+Ext.baseCSSPrefix+"trigger-index-1 "+Ext.baseCSSPrefix+"form-trigger "+Ext.baseCSSPrefix+'form-spinner-down" role="button"></div></td></tr>',initComponent:function(){this.callParent();this.addEvents("spin","spinup","spindown")},onRender:function(){var b=this,a;b.callParent(arguments);a=b.triggerEl;b.spinUpEl=a.item(0);b.spinDownEl=a.item(1);b.setSpinUpEnabled(b.spinUpEnabled);b.setSpinDownEnabled(b.spinDownEnabled);if(b.keyNavEnabled){b.spinnerKeyNav=new Ext.util.KeyNav(b.inputEl,{scope:b,up:b.spinUp,down:b.spinDown})}if(b.mouseWheelEnabled){b.mon(b.bodyEl,"mousewheel",b.onMouseWheel,b)}},getSubTplMarkup:function(){var a=this,b=Ext.form.field.Base.prototype.getSubTplMarkup.apply(a,arguments);return'<table id="'+a.id+'-triggerWrap" class="'+Ext.baseCSSPrefix+'form-trigger-wrap" cellpadding="0" cellspacing="0"><tbody><tr><td id="'+a.id+'-inputCell" rowspan="2">'+b+"</td>"+a.getTriggerMarkup()+"</tbody></table>"},getTriggerMarkup:function(){var a=this,b=(a.readOnly||a.hideTrigger);return a.getTpl("triggerTpl").apply({triggerStyle:"width:"+a.triggerWidth+(b?"px;display:none":"px")})},getTriggerWidth:function(){var b=this,a=0;if(b.triggerWrap&&!b.hideTrigger&&!b.readOnly){a=b.triggerWidth}return a},onTrigger1Click:function(){this.spinUp()},onTrigger2Click:function(){this.spinDown()},spinUp:function(){var a=this;if(a.spinUpEnabled&&!a.disabled){a.fireEvent("spin",a,"up");a.fireEvent("spinup",a);a.onSpinUp()}},spinDown:function(){var a=this;if(a.spinDownEnabled&&!a.disabled){a.fireEvent("spin",a,"down");a.fireEvent("spindown",a);a.onSpinDown()}},setSpinUpEnabled:function(a){var b=this,c=b.spinUpEnabled;b.spinUpEnabled=a;if(c!==a&&b.rendered){b.spinUpEl[a?"removeCls":"addCls"](b.trigger1Cls+"-disabled")}},setSpinDownEnabled:function(a){var b=this,c=b.spinDownEnabled;b.spinDownEnabled=a;if(c!==a&&b.rendered){b.spinDownEl[a?"removeCls":"addCls"](b.trigger2Cls+"-disabled")}},onMouseWheel:function(b){var a=this,c;if(a.hasFocus){c=b.getWheelDelta();if(c>0){a.spinUp()}else{if(c<0){a.spinDown()}}b.stopEvent()}},onDestroy:function(){Ext.destroyMembers(this,"spinnerKeyNav","spinUpEl","spinDownEl");this.callParent()}});Ext.define("Ext.form.field.Number",{extend:"Ext.form.field.Spinner",alias:"widget.numberfield",alternateClassName:["Ext.form.NumberField","Ext.form.Number"],allowDecimals:true,decimalSeparator:".",submitLocaleSeparator:true,decimalPrecision:2,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,step:1,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",negativeText:"The value cannot be negative",baseChars:"0123456789",autoStripChars:false,initComponent:function(){var a=this,b;a.callParent();a.setMinValue(a.minValue);a.setMaxValue(a.maxValue);if(a.disableKeyFilter!==true){b=a.baseChars+"";if(a.allowDecimals){b+=a.decimalSeparator}if(a.minValue<0){b+="-"}b=Ext.String.escapeRegex(b);a.maskRe=new RegExp("["+b+"]");if(a.autoStripChars){a.stripCharsRe=new RegExp("[^"+b+"]","gi")}}},getErrors:function(c){var b=this,e=b.callParent(arguments),d=Ext.String.format,a;c=Ext.isDefined(c)?c:this.processRawValue(this.getRawValue());if(c.length<1){return e}c=String(c).replace(b.decimalSeparator,".");if(isNaN(c)){e.push(d(b.nanText,c))}a=b.parseValue(c);if(b.minValue===0&&a<0){e.push(this.negativeText)}else{if(a<b.minValue){e.push(d(b.minText,b.minValue))}}if(a>b.maxValue){e.push(d(b.maxText,b.maxValue))}return e},rawToValue:function(b){var a=this.fixPrecision(this.parseValue(b));if(a===null){a=b||null}return a},valueToRaw:function(c){var b=this,a=b.decimalSeparator;c=b.parseValue(c);c=b.fixPrecision(c);c=Ext.isNumber(c)?c:parseFloat(String(c).replace(a,"."));c=isNaN(c)?"":String(c).replace(".",a);return c},getSubmitValue:function(){var a=this,b=a.callParent();if(!a.submitLocaleSeparator){b=b.replace(a.decimalSeparator,".")}return b},onChange:function(){this.toggleSpinners();this.callParent(arguments)},toggleSpinners:function(){var a=this,b=a.getValue();valueIsNull=b===null;a.setSpinUpEnabled(valueIsNull||b<a.maxValue);a.setSpinDownEnabled(valueIsNull||b>a.minValue)},setMinValue:function(a){this.minValue=Ext.Number.from(a,Number.NEGATIVE_INFINITY);this.toggleSpinners()},setMaxValue:function(a){this.maxValue=Ext.Number.from(a,Number.MAX_VALUE);this.toggleSpinners()},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?null:a},fixPrecision:function(d){var c=this,b=isNaN(d),a=c.decimalPrecision;if(b||!d){return b?"":d}else{if(!c.allowDecimals||a<=0){a=0}}return parseFloat(Ext.Number.toFixed(parseFloat(d),a))},beforeBlur:function(){var b=this,a=b.parseValue(b.getRawValue());if(!Ext.isEmpty(a)){b.setValue(a)}},onSpinUp:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()+a.step,a.minValue,a.maxValue))}},onSpinDown:function(){var a=this;if(!a.readOnly){a.setValue(Ext.Number.constrain(a.getValue()-a.step,a.minValue,a.maxValue))}}});Ext.define("Ext.layout.container.Container",{extend:"Ext.layout.Layout",alternateClassName:"Ext.layout.ContainerLayout",mixins:{elementCt:"Ext.util.ElementContainer"},requires:["Ext.XTemplate"],type:"container",manageOverflow:0,beginCollapse:Ext.emptyFn,beginExpand:Ext.emptyFn,animatePolicy:null,childEls:["overflowPadderEl"],renderTpl:["{%this.renderBody(out,values)%}"],usesContainerHeight:true,usesContainerWidth:true,usesHeight:true,usesWidth:true,constructor:function(){this.callParent(arguments);this.mixins.elementCt.constructor.call(this)},destroy:function(){this.callParent();this.mixins.elementCt.destroy.call(this)},beginLayout:function(a){this.callParent(arguments);a.targetContext=a.getEl("getTarget",this);this.cacheChildItems(a)},beginLayoutCycle:function(c,a){var b=this,d=b.overflowPadderEl;b.callParent(arguments);if(a){if(b.usesContainerHeight){++c.consumersContainerHeight}if(b.usesContainerWidth){++c.consumersContainerWidth}}if(d){d.setStyle("display","none")}},cacheChildItems:function(e){var c=e.context,g=[],a=this.getVisibleItems(),d=a.length,b;e.childItems=g;e.visibleItems=a;for(b=0;b<d;++b){g.push(c.getCmp(a[b]))}},cacheElements:function(){var a=this.owner;this.applyChildEls(a.el,a.id)},calculateContentSize:function(q,m){var B=this,d=(m||0)|B.manageOverflow|((q.widthModel.shrinkWrap?1:0)|(q.heightModel.shrinkWrap?2:0)),c=(d&1)||undefined,j=(d&2)||undefined,b=q.childItems,g=b.length,w=0,u=0,n=0,e=q.props,r,p,o,A,h,l,t,z,y,s,x,a,v,k;if(c){if(isNaN(e.contentWidth)){++n}else{c=undefined}}if(j){if(isNaN(e.contentHeight)){++n}else{j=undefined}}if(n){for(x=0;x<g;++x){t=b[x];l=t.target;s=j&&t.getProp("height");v=c&&t.getProp("width");a=t.getMarginInfo();if((c&&isNaN(l.x))||(j&&isNaN(l.y))){k=l.el.getXY();if(!r){r=q.targetContext.el.getXY();h=q.targetContext.getBorderInfo();p=r[0]+h.left;o=r[1]+h.top}z=k[0]-p;y=k[1]-o}else{z=l.x;y=l.y}s+=a.bottom;v+=a.right;w=Math.max(w,y+s);u=Math.max(u,z+v);if(isNaN(w)&&isNaN(u)){B.done=false;return}}if(c||j){A=q.targetContext.getPaddingInfo()}if(c&&!q.setContentWidth(u+A.right)){B.done=false}if(j&&!q.setContentHeight(w+A.bottom)){B.done=false}}},calculateOverflow:function(n,s,h){var w=this,a=w.owner,l=w.manageOverflow,d=n.state,m=d.overflowAdjust,g,k,c,o,b,q,t,j,r,e,p,u,i,v;if(l&&!m){if(a.autoScroll){i=v=true}else{if(a.overflowX){i=a.overflowX=="auto"}else{q=n.targetContext.getStyle("overflow-x");i=q&&q!="hidden"&&q!="scroll"}if(a.overflowY){v=a.overflowY=="auto"}else{q=n.targetContext.getStyle("overflow-y");v=q&&q!="hidden"&&q!="scroll"}}if(!s.gotWidth){i=false}if(!s.gotHeight){v=false}if(i||v){t=Ext.getScrollbarSize();j=n.peek("contentWidth");r=n.peek("contentHeight");e=s.width;p=s.height;u=w.getScrollbarsNeeded(e,p,j,r);d.overflowState=u;if(typeof h=="number"){u&=~h}if(u){m={width:(i&&(u&2))?t.width:0,height:(v&&(u&1))?t.height:0};if(m.width+m.height){w.done=false;n.invalidate({state:{overflowAdjust:m,overflowState:d.overflowState}})}}}}if(!w.done){return}c=n.padElContext||(n.padElContext=n.getEl("overflowPadderEl",w));if(c){u=d.overflowState;g=s.width;k=0;if(u){o=n.targetContext.getPaddingInfo();b=w.scrollRangeFlags;if((u&2)&&(b&1)){k+=o.bottom}if((u&1)&&(b&4)){g+=o.right}c.setProp("display","");c.setSize(g,k)}else{c.setProp("display","none")}}},configureItem:function(c){var b=this,d=b.itemCls,a=b.owner.itemCls;b.callParent(arguments);if(d){c.addCls(d)}if(a){c.addCls(a)}},doRenderBody:function(a,b){this.renderItems(a,b);this.renderContent(a,b)},doRenderContainer:function(b,e){var c=e.$comp.layout,a=c.getRenderTpl(),d=c.getRenderData();a.applyOut(d,b)},doRenderItems:function(b,d){var c=d.$layout,a=c.getRenderTree();if(a){Ext.DomHelper.generateMarkup(a,b)}},doRenderPadder:function(b,d){var c=d.$layout,a=c.owner,e=c.getScrollRangeFlags();if(c.manageOverflow==2){if(e&5){b.push('<div id="',a.id,'-overflowPadderEl" ','style="font-size: 1px; width:1px; height: 1px;');b.push('"></div>');c.scrollRangeFlags=e}}},finishRender:function(){var b=this,c,a;b.callParent();b.cacheElements();c=b.getRenderTarget();a=b.getLayoutItems();if(b.targetCls){b.getTarget().addCls(b.targetCls)}b.finishRenderItems(c,a)},notifyOwner:function(){this.owner.afterLayout(this)},getContainerSize:function(c,h){var d=c.targetContext,g=d.getFrameInfo(),k=d.getPaddingInfo(),j=0,l=0,a=c.state.overflowAdjust,e,i,b,m;if(!c.widthModel.shrinkWrap){++l;b=h?d.getDomProp("width"):d.getProp("width");e=(typeof b=="number");if(e){++j;b-=g.width+k.width;if(a){b-=a.width}}}if(!c.heightModel.shrinkWrap){++l;m=h?d.getDomProp("height"):d.getProp("height");i=(typeof m=="number");if(i){++j;m-=g.height+k.height;if(a){m-=a.height}}}return{width:b,height:m,needed:l,got:j,gotAll:j==l,gotWidth:e,gotHeight:i}},getLayoutItems:function(){var a=this.owner,b=a&&a.items;return(b&&b.items)||[]},getRenderData:function(){var a=this.owner;return{$comp:a,$layout:this,ownerId:a.id}},getRenderedItems:function(){var e=this,h=e.getRenderTarget(),a=e.getLayoutItems(),d=a.length,g=[],b,c;for(b=0;b<d;b++){c=a[b];if(c.rendered&&e.isValidParent(c,h,b)){g.push(c)}}return g},getRenderTarget:function(){return this.owner.getTargetEl()},getRenderTpl:function(){var a=this,b=Ext.XTemplate.getTpl(this,"renderTpl");if(!b.renderContent){a.owner.setupRenderTpl(b)}return b},getRenderTree:function(){var a,c=this.owner.items,d,b={};do{d=c.generation;a=this.getItemsRenderTree(this.getLayoutItems(),b)}while(c.generation!==d);return a},getScrollbarsNeeded:function(c,i,b,h){var a=Ext.getScrollbarSize(),e=typeof c=="number",j=typeof i=="number",g=0,d=0;if(j&&i<h){d=2;c-=a.width}if(e&&c<b){g=1;if(!d&&j){i-=a.height;if(i<h){d=2}}}return d+g},getScrollRangeFlags:function(){var a=-1;return function(){if(a<0){var g=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"border-box",style:{width:"100px",height:"100px",padding:"10px",overflow:"auto"},children:[{style:{border:"1px solid red",width:"150px",height:"150px",margin:"0 5px 5px 0"}}]}),d=g.dom.scrollHeight,c=g.dom.scrollWidth,e={175:0,165:1,170:2,160:3},b={175:0,165:4,170:8,160:12};a=(e[d]||0)|(b[c]||0);g.remove()}return a}}(),getTarget:function(){return this.owner.getTargetEl()},getVisibleItems:function(){var g=this.getRenderTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c<e;c++){d=b[c];if(d.rendered&&this.isValidParent(d,g,c)&&d.hidden!==true){a.push(d)}}return a},setupRenderTpl:function(b){var a=this;b.renderBody=a.doRenderBody;b.renderContainer=a.doRenderContainer;b.renderItems=a.doRenderItems;b.renderPadder=a.doRenderPadder}});Ext.define("Ext.layout.container.Auto",{alias:["layout.auto","layout.autocontainer"],extend:"Ext.layout.container.Container",type:"autocontainer",childEls:["clearEl"],renderTpl:["{%this.renderBody(out,values)%}",'<div id="{ownerId}-clearEl" class="',Ext.baseCSSPrefix,'clear" role="presentation"></div>'],calculate:function(b){var a=this,c;if(!b.hasDomProp("containerChildrenDone")){a.done=false}else{c=a.getContainerSize(b);if(!c.gotAll){a.done=false}a.calculateContentSize(b)}}});Ext.define("Ext.container.AbstractContainer",{extend:"Ext.Component",requires:["Ext.util.MixedCollection","Ext.layout.container.Auto","Ext.ZIndexManager"],renderTpl:"{%this.renderContainer(out,values)%}",suspendLayout:false,autoDestroy:true,defaultType:"panel",isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+"container",bubbleEvents:["add","remove"],initComponent:function(){var a=this;a.addEvents("afterlayout","beforeadd","beforeremove","add","remove");a.callParent();a.getLayout();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=new Ext.util.AbstractMixedCollection(false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},getFocusEl:function(){return this.getTargetEl()},finishRenderChildren:function(){this.callParent();var a=this.getLayout();if(a){a.finishRender()}},beforeRender:function(){var b=this,a=b.getLayout();b.callParent();if(!a.initialized){a.initLayout()}},setupRenderTpl:function(b){var a=this.getLayout();this.callParent(arguments);a.setupRenderTpl(b)},setLayout:function(b){var a=this.layout;if(a&&a.isLayout&&a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,a.self.prototype.layout||"autocontainer"))}return a.layout},doLayout:function(){var b=this,a=b.getLayout();if(b.rendered&&a&&!b.suspendLayout&&!b.layoutSuspendCount){b.updateLayout()}return b},afterLayout:function(a){++this.layoutCounter;this.fireEvent("afterlayout",this,a)},prepareItems:function(b,d){if(Ext.isArray(b)){b=b.slice()}else{b=[b]}var c=0,a=b.length,e;for(;c<a;c++){e=b[c];if(d){e=this.applyDefaults(e)}b[c]=this.lookupComponent(e)}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a)}Ext.applyIf(a,b)}return a},lookupComponent:function(a){return(typeof a=="string")?Ext.ComponentManager.get(a):Ext.ComponentManager.create(a,this.defaultType)},getComponentId:function(a){return a.getItemId()},add:function(){var j=this,g=Ext.Array.slice(arguments),d=(typeof g[0]=="number")?g.shift():-1,c=j.getLayout(),l,h,b,a,m,k,e;if(g.length==1&&Ext.isArray(g[0])){h=g[0];l=true}else{h=g}e=h=j.prepareItems(h,true);a=h.length;if(j.rendered){j.suspendLayouts()}if(!l&&a==1){e=h[0]}for(b=0;b<a;b++){m=h[b];k=(d<0)?j.items.length:(d+b);if(m.floating){m.onAdded(j,k)}else{if(j.fireEvent("beforeadd",j,m,k)!==false&&j.onBeforeAdd(m)!==false){j.items.insert(k,m);m.onAdded(j,k);j.onAdd(m,k);c.onAdd(m,k);j.fireEvent("add",j,m,k)}}}if(j.rendered){j.resumeLayouts(true)}return e},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.doLayout();return c},onBeforeAdd:function(c){var b=this,a=c.border;if(c.ownerCt){c.ownerCt.remove(c,false)}if(b.border===false||b.border===0){c.border=Ext.isDefined(a)&&a!==false&&a!==0}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&&d.fireEvent("beforeremove",d,e)!==false){d.doRemove(e,b);d.fireEvent("remove",d,e);if(!d.destroying){d.doLayout()}}return e},doRemove:function(c,b){var e=this,d=e.layout,a=d&&e.rendered;e.items.remove(c);c.onRemoved();if(a){d.onRemove(c)}e.onRemove(c,b);if(b===true||(b!==false&&e.autoDestroy)){c.destroy()}if(a&&!b){d.afterRemove(c)}},removeAll:function(c){var h=this,e=h.items.items.slice(),b=[],d=0,a=e.length,g;h.suspendLayouts();for(;d<a;d++){g=e[d];h.remove(g,c);if(g.ownerCt!==h){b.push(g)}}h.resumeLayouts(!!a);return b},getRefItems:function(c){var h=this,d=h.items.items,b=d.length,e=0,g,a=[];for(;e<b;e++){g=d[e];a.push(g);if(c&&g.getRefItems){a.push.apply(a,g.getRefItems(true))}}if(h.floatingItems&&h.floatingItems.accessList){a.push.apply(a,h.floatingItems.accessList)}return a},cascade:function(l,m,a){var k=this,e=k.items?k.items.items:[],g=e.length,d=0,j,h=a?a.concat(k):[k],b=h.length-1;if(l.apply(m||k,h)!==false){for(;d<g;d++){j=e[d];if(j.cascade){j.cascade(l,m,a)}else{h[b]=j;l.apply(m||e,h)}}}return this},isAncestor:function(a){while(a){if(a.ownerCt===this){return true}a=a.ownerCt}},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},query:function(a){a=a||"*";return Ext.ComponentQuery.query(a,this)},queryBy:function(g,e){var c=[],b=this.getRefItems(true),d=0,a=b.length,h;for(;d<a;++d){h=b[d];if(g.call(e||h,h)!==false){c.push(h)}}return c},queryById:function(a){return this.down("#"+a)},child:function(a){a=a||"";return this.query("> "+a)[0]||null},nextChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},prevChild:function(e,b){var c=this,a,d=c.items.indexOf(e);if(d!==-1){a=b?Ext.ComponentQuery(b,c.items.items.slice(d+1)):c.items.getAt(d+1);if(!a&&c.ownerCt){a=c.ownerCt.nextChild(c,b)}}return a},down:function(a){return this.query(a)[0]||null},enable:function(){this.callParent(arguments);Ext.Array.forEach(this.getChildItemsToDisable(),function(a){if(a.resetDisable){a.enable()}})},disable:function(){this.callParent(arguments);Ext.Array.forEach(this.getChildItemsToDisable(),function(a){if(a.resetDisable!==false&&!a.disabled){a.disable();a.resetDisable=true}})},getChildItemsToDisable:function(){return this.query("[isFormField]")},beforeLayout:function(){return true},beforeDestroy:function(){var b=this,a=b.items,d;if(a){while((d=a.first())){b.doRemove(d,true)}}Ext.destroy(b.layout);b.callParent()}});Ext.define("Ext.container.Container",{extend:"Ext.container.AbstractContainer",alias:"widget.container",alternateClassName:"Ext.Container",statics:{onContainerHide:function(e,d,b){var a=this.prototype,c=a.globalHideEvent;if(!c){a.globalHideEvent=c=new Ext.util.Event()}c.addListener(e,d,b)},removeHideListener:function(c,b){var a=this.prototype.globalHideEvent;if(a){a.removeListener(c,b)}},fireHideEvent:function(a){var b=this.prototype.globalHideEvent;if(b){b.fire(a)}},onContainerShow:function(e,d,c){var b=this.prototype,a=b.globalShowEvent;if(!a){b.globalShowEvent=a=new Ext.util.Event()}a.addListener(e,d,c)},removeShowListener:function(c,b){var a=this.prototype.globalShowEvent;if(a){a.removeListener(c,b)}},fireShowEvent:function(b){var a=this.prototype.globalShowEvent;if(a){a.fire(b)}}},getChildByElement:function(e,a){var h,c,b=0,d=this.getRefItems(),g=d.length;e=Ext.getDom(e);for(;b<g;b++){h=d[b];c=h.getEl();if((c.dom===e)||c.contains(e)){return(a&&h.getChildByElement)?h.getChildByElement(e,a):h}}return null},afterHide:function(){this.callParent(arguments);this.statics().fireHideEvent(this)},afterShow:function(){this.callParent(arguments);this.statics().fireShowEvent(this)}});Ext.define("Ext.container.Viewport",{extend:"Ext.container.Container",alias:"widget.viewport",requires:["Ext.EventManager"],alternateClassName:"Ext.Viewport",isViewport:true,ariaRole:"application",initComponent:function(){var c=this,a=Ext.fly(document.body.parentNode),b;Ext.getScrollbarSize();c.callParent(arguments);a.addCls(Ext.baseCSSPrefix+"viewport");if(c.autoScroll){delete c.autoScroll;a.setStyle("overflow","auto")}c.el=b=Ext.getBody();b.setHeight=Ext.emptyFn;b.setWidth=Ext.emptyFn;b.setSize=Ext.emptyFn;b.dom.scroll="no";c.allowDomMove=false;c.renderTo=c.el},onRender:function(){var a=this;a.callParent(arguments);a.width=Ext.Element.getViewportWidth();a.height=Ext.Element.getViewportHeight()},afterFirstLayout:function(){var a=this;a.callParent(arguments);setTimeout(function(){Ext.EventManager.onWindowResize(a.fireResize,a)},1)},fireResize:function(b,a){if(b!=this.width||a!=this.height){this.setSize(b,a)}}});Ext.define("Ext.form.FieldContainer",{extend:"Ext.container.Container",mixins:{labelable:"Ext.form.Labelable",fieldAncestor:"Ext.form.FieldAncestor"},requires:"Ext.layout.component.field.FieldContainer",alias:"widget.fieldcontainer",componentLayout:"fieldcontainer",combineLabels:false,labelConnector:", ",combineErrors:false,maskOnDisable:false,fieldSubTpl:"{%this.renderContainer(out,values)%}",initComponent:function(){var a=this;a.initLabelable();a.initFieldAncestor();a.callParent()},onLabelableAdded:function(a){var b=this;b.mixins.fieldAncestor.onLabelableAdded.call(this,a);b.updateLabel()},onLabelableRemoved:function(a){var b=this;b.mixins.fieldAncestor.onLabelableRemoved.call(this,a);b.updateLabel()},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getFieldLabel:function(){var a=this.fieldLabel||"";if(!a&&this.combineLabels){a=Ext.Array.map(this.query("[isFieldLabelable]"),function(b){return b.getFieldLabel()}).join(this.labelConnector)}return a},getSubTplData:function(){var a=this.initRenderData();Ext.apply(a,this.subTplData);return a},getSubTplMarkup:function(){var c=this,a=c.getTpl("fieldSubTpl"),b;if(!a.renderContent){c.setupRenderTpl(a)}b=a.apply(c.getSubTplData());return b},updateLabel:function(){var b=this,a=b.labelEl;if(a){a.update(b.getFieldLabel())}},onFieldErrorChange:function(e,b){if(this.combineErrors){var d=this,g=d.getActiveError(),c=Ext.Array.filter(d.query("[isFormField]"),function(h){return h.hasActiveError()}),a=d.getCombinedErrors(c);if(a){d.setActiveErrors(a)}else{d.unsetActiveError()}if(g!==d.getActiveError()){d.doComponentLayout()}}},getCombinedErrors:function(a){var b=Ext.Array.forEach,c=[];b(a,function(d){b(d.getActiveErrors(),function(g){var e=d.getFieldLabel();c.push((e?e+": ":"")+g)})});return c},getTargetEl:function(){return this.bodyEl||this.callParent()}});Ext.define("Ext.form.FieldSet",{extend:"Ext.container.Container",alias:"widget.fieldset",uses:["Ext.form.field.Checkbox","Ext.panel.Tool","Ext.layout.container.Anchor","Ext.layout.component.FieldSet"],collapsed:false,toggleOnTitleClick:true,baseCls:Ext.baseCSSPrefix+"fieldset",layout:"anchor",border:1,componentLayout:"fieldset",autoEl:"fieldset",childEls:["body"],renderTpl:["{%this.renderLegend(out,values);%}",'<div id="{id}-body" class="{baseCls}-body">',"{%this.renderContainer(out,values);%}","</div>"],maskOnDisable:false,beforeDestroy:function(){var b=this,a=b.legend;if(a){delete a.ownerCt;a.destroy();b.legend=null}b.callParent()},initComponent:function(){var b=this,a=b.baseCls;b.callParent();b.addEvents("beforeexpand","beforecollapse","expand","collapse");if(b.collapsed){b.addCls(a+"-collapsed");b.collapse()}},initRenderData:function(){var a=this.callParent();a.baseCls=this.baseCls;return a},getState:function(){var a=this.callParent();a=this.addPropertyToState(a,"collapsed");return a},afterCollapse:Ext.emptyFn,afterExpand:Ext.emptyFn,collapsedHorizontal:function(){return true},collapsedVertical:function(){return true},createLegendCt:function(){var c=this,a=[],b={xtype:"container",baseCls:this.baseCls+"-header",id:c.id+"-legend",autoEl:"legend",items:a,ownerCt:c,ownerLayout:c.componentLayout};if(c.checkboxToggle){a.push(c.createCheckboxCmp())}else{if(c.collapsible){a.push(c.createToggleCmp())}}a.push(c.createTitleCmp());return b},createTitleCmp:function(){var b=this,a={xtype:"component",html:b.title,cls:b.baseCls+"-header-text",id:b.id+"-legendTitle"};if(b.collapsible&&b.toggleOnTitleClick){a.listeners={el:{scope:b,click:b.toggle}}}return(b.titleCmp=Ext.widget(a))},createCheckboxCmp:function(){var a=this,b="-checkbox";a.checkboxCmp=Ext.widget({xtype:"checkbox",hideEmptyLabel:true,name:a.checkboxName||a.id+b,cls:a.baseCls+"-header"+b,id:a.id+"-legendChk",checked:!a.collapsed,listeners:{change:a.onCheckChange,scope:a}});return a.checkboxCmp},createToggleCmp:function(){var a=this;a.toggleCmp=Ext.widget({xtype:"tool",type:"toggle",handler:a.toggle,id:a.id+"-legendToggle",scope:a});return a.toggleCmp},doRenderLegend:function(b,e){var d=e.$comp,c,a;if(d.title||d.checkboxToggle||d.collapsible){d.legend=c=Ext.widget(d.createLegendCt());c.ownerLayout.configureItem(c);a=d.legend.getRenderTree();Ext.DomHelper.generateMarkup(a,b)}},finishRender:function(){var a=this.legend;this.callParent();if(a){a.finishRender()}},getCollapsed:function(){return this.collapsed?"top":false},getCollapsedDockedItems:function(){var a=this.legend;return a?[a]:[]},setTitle:function(b){var a=this;a.title=b;a.initLegend();a.titleCmp.update(b);return a},getTargetEl:function(){return this.body||this.frameBody||this.el},getContentTarget:function(){return this.body},expand:function(){return this.setExpanded(true)},collapse:function(){return this.setExpanded(false)},setExpanded:function(b){var c=this,d=c.checkboxCmp,a=b?"expand":"collapse";if(!c.rendered||c.fireEvent("before"+a,c)!==false){b=!!b;if(d){d.setValue(b)}if(b){c.removeCls(c.baseCls+"-collapsed")}else{c.addCls(c.baseCls+"-collapsed")}c.collapsed=!b;if(c.rendered){c.updateLayout();c.fireEvent(a,c)}}return c},toggle:function(){this.setExpanded(!!this.collapsed)},onCheckChange:function(b,a){this.setExpanded(a)},setupRenderTpl:function(a){this.callParent(arguments);a.renderLegend=this.doRenderLegend}});Ext.define("Ext.grid.header.Container",{extend:"Ext.container.Container",uses:["Ext.grid.ColumnLayout","Ext.grid.column.Column","Ext.menu.Menu","Ext.menu.CheckItem","Ext.menu.Separator","Ext.grid.plugin.HeaderResizer","Ext.grid.plugin.HeaderReorderer"],border:true,alias:"widget.headercontainer",baseCls:Ext.baseCSSPrefix+"grid-header-ct",dock:"top",weight:100,defaultType:"gridcolumn",defaultWidth:100,sortAscText:"Sort Ascending",sortDescText:"Sort Descending",sortClearText:"Clear Sort",columnsText:"Columns",headerOpenCls:Ext.baseCSSPrefix+"column-header-open",triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.plugins=a.plugins||[];if(!a.isHeader){a.resizer=new Ext.grid.plugin.HeaderResizer();a.reorderer=new Ext.grid.plugin.HeaderReorderer();if(!a.enableColumnResize){a.resizer.disable()}if(!a.enableColumnMove){a.reorderer.disable()}a.plugins.push(a.reorderer,a.resizer)}if(a.isHeader&&!a.items){a.layout=a.layout||"auto"}else{a.layout=Ext.apply({type:"gridcolumn",align:"stretchmax"},a.initialConfig.layout)}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{triStateSort:a.triStateSort,sortable:a.sortable});a.menuTask=new Ext.util.DelayedTask(a.updateMenuDisabledState,a);a.callParent();a.addEvents("columnresize","headerclick","headertriggerclick","columnmove","columnhide","columnshow","sortchange","menucreate")},onDestroy:function(){var a=this;a.menuTask.cancel();Ext.destroy(a.resizer,a.reorderer);a.callParent()},applyColumnsState:function(d){if(!d||!d.length){return}var e=this,c=0,b,a;Ext.each(d,function(g){a=e.down("gridcolumn[headerId="+g.id+"]");if(a){b=e.items.indexOf(a);if(c!==b){e.moveHeader(b,c)}if(a.applyColumnState){a.applyColumnState(g)}++c}})},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&&d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(b){var a=this;if(!b.headerId){b.headerId=b.initialConfig.id||Ext.id(null,"header-")}a.callParent(arguments);a.purgeCache()},onRemove:function(b){var a=this;a.callParent(arguments);a.purgeCache()},applyDefaults:function(b){var a;if(b&&!b.isComponent&&b.xtype=="rownumberer"){a=b}else{a=this.callParent(arguments);if(!("width" in a)&&!a.flex){a.width=this.defaultWidth}}return a},afterRender:function(){this.callParent();this.setSortState()},setSortState:function(){var a=this.up("[store]").store,c=a.sorters,d=c.first(),b;if(d){b=this.down("gridcolumn[dataIndex="+d.property+"]");if(b){b.setSortState(d.direction,false,true)}}},getHeaderMenu:function(){var b=this.getMenu(),a;if(b){a=b.child("#columnItem");if(a){return a.menu}}return null},onHeaderVisibilityChange:function(e,d){var b=this,c=b.getHeaderMenu(),a;if(c){a=b.getMenuItemForHeader(c,e);if(a){a.setChecked(d,true)}b.menuTask.delay(50)}},getLeafMenuItems:function(){var h=this,d=h.getGridColumns(),b=[],c=0,g=0,a=d.length,j=h.getMenu(),e;for(;c<a;++c){e=d[c];if(e.hideable){e=h.getMenuItemForHeader(j,e);if(e){b.push(e);if(e.checked){++g}}}}return{items:b,checkedCount:g}},updateMenuDisabledState:function(){var h=this,b=h.getLeafMenuItems(),g=b.checkedCount,d=b.items,a=d.length,e=0,c=h.getMenu().child("#columnItem");if(g<=1){h.disableMenuItems(c,Ext.ComponentQuery.query("[checked=true]",d)[0])}else{for(;e<a;++e){h.setMenuItemState(g,c,d[e])}}},disableMenuItems:function(a,b){while(b&&b!=a){b.disableCheckChange();b=b.parentMenu.ownerItem}},setMenuItemState:function(e,a,d){var c,b;while(d&&d!=a){c=d.parentMenu;b=d.parentMenu.query("[checked=true]:not([menu])").length;d.enableCheckChange();d=c.ownerItem;if(b===e){break}}this.disableMenuItems(a,d)},getMenuItemForHeader:function(a,b){return b?a.down("menucheckitem[headerId="+b.id+"]"):null},onHeaderShow:function(c){var b=this,a=b.ownerCt;b.onHeaderVisibilityChange(c,true);if(!c.isGroupHeader){if(b.view){b.view.onHeaderShow(b,c,true)}if(a){a.onHeaderShow(b,c)}}b.fireEvent("columnshow",b,c);b.updateLayout()},onHeaderHide:function(c){var b=this,a=b.ownerCt;b.onHeaderVisibilityChange(c,false);if(!c.isGroupHeader){if(b.view){b.view.ignoreTemplate=true;b.view.onHeaderHide(b,c,true);b.view.ignoreTemplate=false}if(a){a.onHeaderHide(b,c)}b.updateLayout()}b.fireEvent("columnhide",b,c)},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(g,b,e){var d=this,a=d.view,c;if(a&&(c=a.el)&&c.dom.firstChild){d.tempLock();a.onHeaderResize(g,b,e)}d.fireEvent("columnresize",this,g,b)},onHeaderClick:function(c,b,a){c.fireEvent("headerclick",this,c,b,a);this.fireEvent("headerclick",this,c,b,a)},onHeaderTriggerClick:function(d,c,a){var b=this;if(d.fireEvent("headertriggerclick",b,d,c,a)!==false&&b.fireEvent("headertriggerclick",b,d,c,a)!==false){b.showMenuBy(a,d)}},showMenuBy:function(b,g){var d=this.getMenu(),e=d.down("#ascItem"),c=d.down("#descItem"),a;d.activeHeader=d.ownerCt=g;d.setFloatParent(g);g.titleEl.addCls(this.headerOpenCls);a=g.sortable?"enable":"disable";if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuDeactivate:function(){var a=this.getMenu();a.activeHeader.titleEl.removeCls(this.headerOpenCls)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),a,b)},purgeCache:function(){var a=this;delete a.gridDataColumns;delete a.hideableColumns;if(a.menu){a.menu.hide();a.menu.destroy();delete a.menu}},onHeaderMoved:function(g,a,c,e){var d=this,b=d.ownerCt;if(b&&b.onHeaderMove){b.onHeaderMove(d,g,a,c,e)}d.fireEvent("columnmove",d,g,c,e)},getMenu:function(){var a=this;if(!a.menu){a.menu=new Ext.menu.Menu({hideOnParentHide:false,items:a.getMenuItems(),listeners:{deactivate:a.onMenuDeactivate,scope:a}});a.updateMenuDisabledState();a.fireEvent("menucreate",a,a.menu)}return a.menu},getMenuItems:function(){var c=this,b=[],a=c.enableColumnHide?c.getColumnMenu(c):null;if(c.sortable){b=[{itemId:"ascItem",text:c.sortAscText,cls:Ext.baseCSSPrefix+"hmenu-sort-asc",handler:c.onSortAscClick,scope:c},{itemId:"descItem",text:c.sortDescText,cls:Ext.baseCSSPrefix+"hmenu-sort-desc",handler:c.onSortDescClick,scope:c}]}if(a&&a.length){b.push("-",{itemId:"columnItem",text:c.columnsText,cls:Ext.baseCSSPrefix+"cols-icon",menu:a})}return b},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("ASC")},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState("DESC")},getColumnMenu:function(g){var c=[],b=0,e,a=g.query(">gridcolumn[hideable]"),h=a.length,d;for(;b<h;b++){e=a[b];d=new Ext.menu.CheckItem({text:e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?"show":"hide"]()},getColumnsForTpl:function(e){var c=[],d=this.getGridColumns(e),h=d.length,a=0,g,b;for(;a<h;a++){g=d[a];if(g.hidden||g.up("headercontainer[hidden=true]")){b=0}else{b=g.getDesiredWidth()}c.push({dataIndex:g.dataIndex,align:g.align,width:b,id:g.id,cls:g.tdCls,columnId:g.getItemId()})}return c},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(d){var c=0,b=this.getVisibleGridColumns(d),g=b.length,a=0,e;for(;a<g;a++){e=b[a];if(e.getDesiredWidth){c+=e.getDesiredWidth()||0}else{c+=e.getWidth()}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),d=c.length,b=0;for(;b<d;b++){if(c[b]!==a){c[b].setSortState(null,true)}}},getVisibleGridColumns:function(a){return Ext.ComponentQuery.query(":not([hidden])",this.getGridColumns(a))},getGridColumns:function(b){var c=this,a=b?null:c.gridDataColumns;if(!a){c.gridDataColumns=a=[];c.cascade(function(d){if((d!==c)&&!d.isGroupHeader){a.push(d)}})}return a},getHideableColumns:function(b){var c=this,a=b?null:c.hideableColumns;if(!a){a=c.hideableColumns=c.query("[hideable]")}return a},getHeaderIndex:function(c){var b=this,a=this.getGridColumns();if(c.isGroupHeader){c=c.down(":not([isgroupHeader])")}return Ext.Array.indexOf(a,c)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b[a]},prepareData:function(i,c,k,n,a){var m=this,h={},d=m.gridDataColumns||m.getGridColumns(),e=d.length,g=0,j,q,l,p,b,o=a.store;for(;g<e;g++){b={tdCls:"",style:""};j=d[g];q=j.id;l=j.renderer;p=i[j.dataIndex];if(typeof l=="string"){j.renderer=l=Ext.util.Format[l]}if(typeof l=="function"){p=l.call(j.scope||m.ownerCt,p,b,k,c,g,o,n)}if(m.markDirty){h[q+"-modified"]=k.isModified(j.dataIndex)?Ext.baseCSSPrefix+"grid-dirty-cell":""}h[q+"-tdCls"]=b.tdCls;h[q+"-tdAttr"]=b.tdAttr;h[q+"-style"]=b.style;if(typeof p==="undefined"||p===null||p===""){p=j.emptyCellText}h[q]=p}return h},expandToFit:function(b){var a=this.view;if(a){a.expandToFit(b)}}});Ext.define("Ext.grid.property.HeaderContainer",{extend:"Ext.grid.header.Container",alternateClassName:"Ext.grid.PropertyColumnModel",nameWidth:115,nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",nameColumnCls:Ext.baseCSSPrefix+"grid-property-name",constructor:function(b,a){var c=this;c.grid=b;c.store=a;c.callParent([{items:[{header:c.nameText,width:b.nameColumnWidth||c.nameWidth,sortable:b.sortableColumns,dataIndex:b.nameField,renderer:Ext.Function.bind(c.renderProp,c),itemId:b.nameField,menuDisabled:true,tdCls:c.nameColumnCls},{header:c.valueText,renderer:Ext.Function.bind(c.renderCell,c),getEditor:Ext.Function.bind(c.getCellEditor,c),sortable:b.sortableColumns,flex:1,fixed:true,dataIndex:b.valueField,itemId:b.valueField,menuDisabled:true}]}])},getCellEditor:function(a){return this.grid.getCellEditor(a,this)},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(g,d,e){var b=this,c=b.grid.customRenderers[e.get(b.grid.nameField)],a=g;if(c){return c.apply(b,arguments)}if(Ext.isDate(g)){a=b.renderDate(g)}else{if(Ext.isBoolean(g)){a=b.renderBool(g)}}return Ext.util.Format.htmlEncode(a)},renderDate:Ext.util.Format.date,renderBool:function(a){return this[a?"trueText":"falseText"]},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b}});Ext.define("Ext.layout.container.Anchor",{alias:"layout.anchor",extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.AnchorLayout",type:"anchor",manageOverflow:2,renderTpl:["{%this.renderBody(out,values)%}",'<div role="presentation" style="clear:none;" class="',Ext.baseCSSPrefix,'clear"></div>',"{%this.renderPadder(out,values)%}"],defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,beginLayout:function(c){var j=this,a=0,g,k,e,d,b,h;j.callParent(arguments);e=c.childItems;b=e.length;for(d=0;d<b;++d){k=e[d];g=k.target.anchorSpec;if(g){if(k.widthModel.calculated&&g.right){a|=1}if(k.heightModel.calculated&&g.bottom){a|=2}if(a==3){break}}}c.anchorDimensions=a;if(!Ext.supports.RightMargin&&!j.rightMarginCleanerFn){h=c.targetContext.el;j.rightMarginCleanerFn=Ext.Element.getRightMarginFixCleaner(h);h.addCls(Ext.baseCSSPrefix+"inline-children")}},calculate:function(b){var a=this,c=a.getContainerSize(b);if(b.anchorDimensions!==b.state.calculatedAnchors){a.calculateAnchors(b,c)}if(b.hasDomProp("containerChildrenDone")){if(!c.gotAll){a.done=false}a.calculateContentSize(b,b.anchorDimensions);if(a.done){a.calculateOverflow(b,c,b.anchorDimensions);return}}a.done=false},calculateAnchors:function(h,a){var p=this,l=h.childItems,g=l.length,o=a.gotHeight,j=a.gotWidth,e=a.height,c=a.width,b=h.state,q=(j?1:0)|(o?2:0),m,s,n,r,k,d;b.calculatedAnchors=(b.calculatedAnchors||0)|q;for(k=0;k<g;k++){s=l[k];n=s.getMarginInfo();m=s.target.anchorSpec;if(j&&s.widthModel.calculated){d=m.right(c)-n.width;d=p.adjustWidthAnchor(d,s);s.setWidth(d)}if(o&&s.heightModel.calculated){r=m.bottom(e)-n.height;r=p.adjustHeightAnchor(r,s);s.setHeight(r)}}},finishedLayout:function(b){var a=this.rightMarginCleanerFn;if(a){delete this.rightMarginCleanerFn;b.targetContext.el.removeCls(Ext.baseCSSPrefix+"inline-children");a()}},anchorFactory:{offset:function(a){return function(b){return b+a}},ratio:function(a){return function(b){return Math.floor(b*a)}},standard:function(a){return function(b){return b-a}}},parseAnchor:function(c,g,b){if(c&&c!="none"){var d=this.anchorFactory,e;if(this.parseAnchorRE.test(c)){return d.standard(b-g)}if(c.indexOf("%")!=-1){return d.ratio(parseFloat(c.replace("%",""))*0.01)}e=parseInt(c,10);if(!isNaN(e)){return d.offset(e)}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b},configureItem:function(g){var e=this,a=e.owner,d=g.anchor,b,c,h;e.callParent(arguments);if(!g.anchor&&g.items&&!Ext.isNumber(g.width)&&!(Ext.isIE6&&Ext.isStrict)){g.anchor=d=e.defaultAnchor}if(a.anchorSize){if(typeof a.anchorSize=="number"){c=a.anchorSize}else{c=a.anchorSize.width;h=a.anchorSize.height}}else{c=a.initialConfig.width;h=a.initialConfig.height}if(d){b=d.split(" ");g.anchorSpec={right:e.parseAnchor(b[0],g.initialConfig.width,c),bottom:e.parseAnchor(b[1],g.initialConfig.height,h)}}},sizePolicy:{"":{setsWidth:0,setsHeight:0},b:{setsWidth:0,setsHeight:1},r:{"":{setsWidth:1,setsHeight:0},b:{setsWidth:1,setsHeight:1}}},getItemSizePolicy:function(b){var d=b.anchorSpec,a="",c=this.sizePolicy;if(d){if(d.right){c=c.r}if(d.bottom){a="b"}}return c[a]}});Ext.define("Ext.layout.container.Absolute",{alias:"layout.absolute",extend:"Ext.layout.container.Anchor",alternateClassName:"Ext.layout.AbsoluteLayout",targetCls:Ext.baseCSSPrefix+"abs-layout-ct",itemCls:Ext.baseCSSPrefix+"abs-layout-item",ignoreOnContentChange:true,type:"absolute",adjustWidthAnchor:function(c,b){var d=this.targetPadding,a=b.getStyle("left");return c-a+d.left},adjustHeightAnchor:function(b,a){var c=this.targetPadding,d=a.getStyle("top");return b-d+c.top},isItemLayoutRoot:function(a){return this.ignoreOnContentChange||this.callParent(arguments)},isItemShrinkWrap:function(a){return true},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&b.parentNode===this.getRenderTarget().dom)||false},beginLayout:function(b){var a=this,c=a.getTarget();a.callParent(arguments);if(c.dom!==document.body){c.position()}a.targetPadding=b.targetContext.getPaddingInfo()},isItemBoxParent:function(a){return true},onContentChange:function(){if(this.ignoreOnContentChange){return false}return this.callParent(arguments)}});Ext.define("Ext.layout.container.Column",{extend:"Ext.layout.container.Container",alias:["layout.column"],alternateClassName:"Ext.layout.ColumnLayout",type:"column",itemCls:Ext.baseCSSPrefix+"column",targetCls:Ext.baseCSSPrefix+"column-layout-ct",columnWidthSizePolicy:{setsWidth:1,setsHeight:0},childEls:["innerCt"],manageOverflow:2,renderTpl:['<div id="{ownerId}-innerCt" class="',Ext.baseCSSPrefix,'column-inner">',"{%this.renderBody(out,values)%}",'<div class="',Ext.baseCSSPrefix,'clear"></div>',"</div>","{%this.renderPadder(out,values)%}"],getItemSizePolicy:function(a){if(a.columnWidth){return this.columnWidthSizePolicy}return this.autoSizePolicy},beginLayout:function(){this.callParent(arguments);this.innerCt.dom.style.width=""},calculate:function(c){var a=this,d=a.getContainerSize(c),b=c.state;if(b.calculatedColumns||(b.calculatedColumns=a.calculateColumns(c))){if(a.calculateHeights(c)){a.calculateOverflow(c,d);return}}a.done=false},calculateColumns:function(d){var m=this,a=m.getContainerSize(d),o=d.getEl("innerCt",m),l=d.childItems,j=l.length,b=0,g,n,e,c,h,k;if(!d.heightModel.shrinkWrap&&!d.targetContext.hasProp("height")){return false}if(!a.gotWidth){d.targetContext.block(m,"width");g=true}else{n=a.width;o.setWidth(n)}for(e=0;e<j;++e){c=l[e];h=c.getMarginInfo().width;if(!c.widthModel.calculated){k=c.getProp("width");if(typeof k!="number"){c.block(m,"width");g=true}b+=k+h}}if(!g){n=(n<b)?0:n-b;for(e=0;e<j;++e){c=l[e];if(c.widthModel.calculated){h=c.marginInfo.width;k=c.target.columnWidth;k=Math.floor(k*n)-h;k=c.setWidth(k);b+=k+h}}d.setContentWidth(b)}return !g},calculateHeights:function(h){var g=this,b=h.childItems,a=b.length,c,d,e;c=false;for(d=0;d<a;++d){e=b[d];if(!e.hasDomProp("height")){e.domBlock(g,"height");c=true}}if(!c){h.setContentHeight(g.innerCt.getHeight()+h.targetContext.getPaddingInfo().height)}return !c},getRenderTarget:function(){return this.innerCt}});Ext.define("Ext.layout.container.Editor",{alias:"layout.editor",extend:"Ext.layout.container.Container",autoSizeDefault:{width:"field",height:"field"},getItemSizePolicy:function(c){var b=this,a=b.owner.autoSize;return b.sizePolicy||(b.sizePolicy={setsWidth:a&&a.width==="boundEl"?1:0,setsHeight:a&&a.height==="boundEl"?1:0})},calculate:function(g){var e=this,b=e.owner,a=b.autoSize,d,c;if(a===true){a=e.autoSizeDefault}if(a){d=e.getDimension(b,a.width,"getWidth",b.width);c=e.getDimension(b,a.height,"getHeight",b.height)}g.childItems[0].setSize(d,c);g.setWidth(d);g.setHeight(c);g.setContentSize(d||b.field.getWidth(),c||b.field.getHeight())},getDimension:function(a,b,d,c){switch(b){case"boundEl":return a.boundEl[d]();case"field":return undefined;default:return c}}});Ext.define("Ext.Editor",{extend:"Ext.container.Container",alias:"widget.editor",requires:["Ext.layout.container.Editor"],layout:"editor",allowBlur:true,revertInvalid:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,hidden:true,baseCls:Ext.baseCSSPrefix+"editor",initComponent:function(){var a=this,b=a.field=Ext.ComponentManager.create(a.field,"textfield");Ext.apply(b,{inEditor:true,msgTarget:b.msgTarget=="title"?"title":"qtip"});a.mon(b,{scope:a,blur:{fn:a.onFieldBlur,delay:1},specialkey:a.onSpecialKey});if(b.grow){a.mon(b,"autosize",a.onFieldAutosize,a,{delay:1})}a.floating={constrain:a.constrain};a.items=b;a.callParent(arguments);a.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onFieldAutosize:function(){this.updateLayout()},afterRender:function(b,a){var c=this,e=c.field,d=e.inputEl;c.callParent(arguments);if(d){d.dom.name="";if(c.swallowKeys){d.swallowEvent(["keypress","keydown"])}}},onSpecialKey:function(g,e){var d=this,b=e.getKey(),a=d.completeOnEnter&&b==e.ENTER,c=d.cancelOnEsc&&b==e.ESC;if(a||c){e.stopEvent();Ext.defer(function(){if(a){d.completeEdit()}else{d.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}},10)}d.fireEvent("specialkey",d,g,e)},startEdit:function(a,c){var b=this,d=b.field;b.completeEdit();b.boundEl=Ext.get(a);c=Ext.isDefined(c)?c:b.boundEl.dom.innerHTML;if(!b.rendered){b.render(b.parentEl||document.body)}if(b.fireEvent("beforestartedit",b,b.boundEl,c)!==false){b.startValue=c;b.show();d.suspendEvents();d.reset();d.setValue(c);d.resumeEvents();b.realign(true);d.focus(false,10);if(d.autoSize){d.autoSize()}b.editing=true}},realign:function(a){var b=this;if(a===true){b.updateLayout()}b.alignTo(b.boundEl,b.alignment,b.offsets)},completeEdit:function(a){var b=this,d=b.field,c;if(!b.editing){return}if(d.assertValue){d.assertValue()}c=b.getValue();if(!d.isValid()){if(b.revertInvalid!==false){b.cancelEdit(a)}return}if(String(c)===String(b.startValue)&&b.ignoreNoChange){b.hideEdit(a);return}if(b.fireEvent("beforecomplete",b,c,b.startValue)!==false){c=b.getValue();if(b.updateEl&&b.boundEl){b.boundEl.update(c)}b.hideEdit(a);b.fireEvent("complete",b,c,b.startValue)}},onShow:function(){var a=this;a.callParent(arguments);if(a.hideEl!==false){a.boundEl.hide()}a.fireEvent("startedit",a.boundEl,a.startValue)},cancelEdit:function(a){var c=this,b=c.startValue,e=c.field,d;if(c.editing){d=c.getValue();e.suspendEvents();c.setValue(b);e.resumeEvents();c.hideEdit(a);c.fireEvent("canceledit",c,d,b)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onFieldBlur:function(){var a=this;if(a.allowBlur===true&&a.editing&&a.selectSameEditor!==true){a.completeEdit()}},onHide:function(){var a=this,b=a.field;if(a.editing){a.completeEdit();return}if(b.hasFocus){b.blur()}if(b.collapse){b.collapse()}if(a.hideEl!==false){a.boundEl.show()}a.callParent(arguments)},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){var a=this;Ext.destroy(a.field);delete a.field;delete a.parentEl;delete a.boundEl;a.callParent(arguments)}});Ext.define("Ext.grid.CellEditor",{extend:"Ext.Editor",constructor:function(a){a=Ext.apply({},a);if(a.field){a.field.monitorTab=false}this.callParent([a])},onShow:function(){var b=this,d=b.boundEl.first(),a,c;if(d){a=d.dom.lastChild;if(a&&a.nodeType===3){c=b.cellTextNode=d.dom.lastChild;b.cellTextValue=c.nodeValue;c.nodeValue="\u00a0"}}b.callParent(arguments)},onHide:function(){var a=this,b=a.boundEl.first();if(b&&a.cellTextNode){a.cellTextNode.nodeValue=a.cellTextValue;delete a.cellTextNode;delete a.cellTextValue}a.callParent(arguments)},afterRender:function(){var a=this,b=a.field;a.callParent(arguments);if(b.isXType("checkboxfield")){b.mon(b.inputEl,{mousedown:a.onCheckBoxMouseDown,click:a.onCheckBoxClick,scope:a})}},onCheckBoxMouseDown:function(){this.completeEdit=Ext.emptyFn},onCheckBoxClick:function(){delete this.completeEdit;this.field.focus(false,10)},realign:function(e){var k=this,h=k.boundEl,j=h.first(),c=j.dom.childNodes,g=c.length,d=Ext.Array.clone(k.offsets),l=k.field.inputEl,b,i,m,a;if(g>1||(g===1&&c[0].nodeType!==3)){b=j.last();i=b.getOffsetsTo(j)[0]+b.getWidth();m=j.getWidth();a=m-i;if(!k.editingPlugin.grid.columnLines){a--}d[0]+=i;k.addCls(Ext.baseCSSPrefix+"grid-editor-on-text-node")}else{a=h.getWidth()-1}if(e===true){k.field.setWidth(a)}k.alignTo(h,k.alignment,d)},alignment:"tl-tl",hideEl:false,cls:Ext.baseCSSPrefix+"small-editor "+Ext.baseCSSPrefix+"grid-editor",shim:false,shadow:false});Ext.define("Ext.layout.container.Fit",{extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",itemCls:Ext.baseCSSPrefix+"fit-item",targetCls:Ext.baseCSSPrefix+"layout-fit",type:"fit",defaultMargins:{top:0,right:0,bottom:0,left:0},manageMargins:true,sizePolicies:{0:{setsWidth:0,setsHeight:0},1:{setsWidth:1,setsHeight:0},2:{setsWidth:0,setsHeight:1},3:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(b){var a=this.owner.getSizeModel(),c=(a.width.shrinkWrap?0:1)|(a.height.shrinkWrap?0:2);return this.sizePolicies[c]},calculate:function(d){var c=this,g=d.childItems,b=g.length,e={contentWidth:0,contentHeight:0,length:b,ownerContext:d,targetSize:c.getContainerSize(d)},a;for(a=0;a<b;++a){e.index=a;c.fitItem(g[a],e)}if(!d.setContentSize(e.contentWidth,e.contentHeight)){c.done=false}},fitItem:function(b,c){var a=this;c.margins=b.getMarginInfo();c.needed=c.got=0;a.fitItemWidth(b,c);a.fitItemHeight(b,c);if(c.got!=c.needed){a.done=false}},fitItemWidth:function(a,b){if(b.ownerContext.widthModel.shrinkWrap){b.contentWidth=Math.max(b.contentWidth,a.getProp("width"))}else{if(a.widthModel.calculated){++b.needed;if(b.targetSize.gotWidth){++b.got;this.setItemWidth(a,b)}}}this.positionItemX(a,b)},fitItemHeight:function(a,b){if(b.ownerContext.heightModel.shrinkWrap){b.contentHeight=Math.max(b.contentHeight,a.getProp("height"))}else{if(a.heightModel.calculated){++b.needed;if(b.targetSize.gotHeight){++b.got;this.setItemHeight(a,b)}}}this.positionItemY(a,b)},positionItemX:function(a,c){var b=c.margins;if(c.index||b.left){a.setProp("x",b.left)}},positionItemY:function(a,c){var b=c.margins;if(c.index||b.top){a.setProp("y",b.top)}},setItemHeight:function(a,b){a.setHeight(b.targetSize.height-b.margins.height)},setItemWidth:function(a,b){a.setWidth(b.targetSize.width-b.margins.width)}});Ext.define("Ext.layout.container.Card",{extend:"Ext.layout.container.Fit",alternateClassName:"Ext.layout.CardLayout",alias:"layout.card",type:"card",hideInactive:true,deferredRender:false,getRenderTree:function(){var a=this;a.getActiveItem();if(a.activeItem&&a.deferredRender){return a.getItemsRenderTree([a.activeItem])}else{return a.callParent(arguments)}},renderChildren:function(){var a=this,b=a.getActiveItem();if(!a.deferredRender){a.callParent()}else{if(b){a.renderItems([b],a.getRenderTarget())}}},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&b.parentNode===(d.dom||d))||false},getActiveItem:function(){var a=this;if(!a.activeItem&&a.owner){a.activeItem=a.parseActiveItem(a.owner.activeItem)}if(a.activeItem&&a.owner.items.indexOf(a.activeItem)!=-1){return a.activeItem}return null},parseActiveItem:function(a){if(a&&a.isComponent){return a}else{if(typeof a=="number"||a===undefined){return this.getLayoutItems()[a||0]}else{return this.owner.getComponent(a)}}},afterRenderItem:function(b,a){this.callParent([b,a]);if(this.hideInactive&&this.activeItem!==b){b.hide()}else{b.show()}},onRemove:function(a){var b=this;if(a===b.activeItem){b.activeItem=null;if(b.owner.items.getCount()===0){b.firstActivated=false}}},getAnimation:function(b,a){var c=(b||{}).cardSwitchAnimation;if(c===false){return false}return c||a.cardSwitchAnimation},getNext:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b+1]||(c?a[0]:false)},next:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getNext(a),b)},getPrev:function(){var c=arguments[0],a=this.getLayoutItems(),b=Ext.Array.indexOf(a,this.activeItem);return a[b-1]||(c?a[a.length-1]:false)},prev:function(){var b=arguments[0],a=arguments[1];return this.setActiveItem(this.getPrev(a),b)},setActiveItem:function(b){var e=this,a=e.owner,d=e.activeItem,c;b=e.parseActiveItem(b);c=a.items.indexOf(b);if(c==-1){c=a.items.items.length;a.add(b)}if(b&&d!=b){if(!b.rendered){e.renderItem(b,e.getRenderTarget(),a.items.length);e.afterRenderItem(b)}if(b.fireEvent("beforeactivate",b,d)===false){return false}if(d&&d.fireEvent("beforedeactivate",d,b)===false){return false}e.owner.suspendLayouts();if(d){if(e.hideInactive){d.hide();d.hiddenByLayout=true}d.fireEvent("deactivate",d,b)}if(b.hidden){b.show()}e.activeItem=b;e.owner.resumeLayouts(true);b.fireEvent("activate",b,d);return b}return false}});Ext.define("Ext.layout.container.Form",{alias:"layout.form",extend:"Ext.layout.container.Auto",alternateClassName:"Ext.layout.FormLayout",type:"form",manageOverflow:2,childEls:["formTable"],renderTpl:['<table id="{ownerId}-formTable" style="width:100%" cellspacing="0" cellpadding="0">',"{%this.renderBody(out,values)%}","</table>","{%this.renderPadder(out,values)%}"],calculate:function(e){var d=this,h=d.getContainerSize(e,true),a,g,b=0,c;if(h.gotWidth){this.callParent(arguments);a=d.formTable.dom.offsetWidth;g=e.childItems;for(c=g.length;b<c;++b){g[b].setWidth(a,false)}}else{d.done=false}},getRenderTarget:function(){return this.formTable},getRenderTree:function(){var b=this.callParent(arguments),c=0,a=b.length,d;for(;c<a;c++){d=b[c];if(d.tag&&d.tag=="table"){d.tag="tbody";delete d.cellspacing;delete d.cellpadding;d.cn='<tr><td class="x-form-item-pad" colspan="3"></td></tr>'}else{b[c]={tag:"tbody",cn:{tag:"tr",cn:{tag:"td",colspan:3,style:"width:100%",cn:d}}}}}return b},isValidParent:function(b,c,a){return true},isItemShrinkWrap:function(a){return((a.shrinkWrap===true)?3:a.shrinkWrap||0)&2},getItemSizePolicy:function(a){return{setsWidth:1,setsHeight:0}}});Ext.define("Ext.layout.container.Table",{alias:["layout.table"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.TableLayout",monitorResize:false,type:"table",clearEl:true,targetCls:Ext.baseCSSPrefix+"table-layout-ct",tableCls:Ext.baseCSSPrefix+"table-layout",cellCls:Ext.baseCSSPrefix+"table-layout-cell",tableAttrs:null,itemSizePolicy:{setsWidth:0,setsHeight:0},getItemSizePolicy:function(a){return this.itemSizePolicy},getLayoutItems:function(){var g=this,b=[],c=g.callParent(),e,a=c.length,d;for(d=0;d<a;d++){e=c[d];if(!e.hidden){b.push(e)}}return b},renderChildren:function(){var j=this,h=j.getLayoutItems(),e=j.owner.getTargetEl().child("table",true).tBodies[0],p=e.rows,d=0,g=h.length,o,m,c,a,n,l,k,b;o=j.calculateCells(h);for(;d<g;d++){m=o[d];c=m.rowIdx;a=m.cellIdx;n=h[d];l=p[c];if(!l){l=e.insertRow(c);if(j.trAttrs){l.set(j.trAttrs)}}b=k=Ext.get(l.cells[a]||l.insertCell(a));if(j.needsDivWrap()){b=k.first()||k.createChild({tag:"div"});b.setWidth(null)}if(!n.rendered){j.renderItem(n,b,0)}else{if(!j.isValidParent(n,b,c,a,e)){j.moveItem(n,b,0)}}if(j.tdAttrs){k.set(j.tdAttrs)}k.set({colSpan:n.colspan||1,rowSpan:n.rowspan||1,id:n.cellId||"",cls:j.cellCls+" "+(n.cellCls||"")});if(!o[d+1]||o[d+1].rowIdx!==c){a++;while(l.cells[a]){l.deleteCell(a)}}}c++;while(e.rows[c]){e.deleteRow(c)}},calculate:function(g){if(!g.hasDomProp("containerChildrenDone")){this.done=false}else{var c=g.targetContext,b=g.widthModel.shrinkWrap,a=g.heightModel.shrinkWrap,h=a||b,d=h&&c.el.child("table",true),e=h&&c.getPaddingInfo();if(b){g.setContentWidth(d.offsetWidth+e.width,true)}if(a){g.setContentHeight(d.offsetHeight+e.height,true)}}},finalizeLayout:function(){if(this.needsDivWrap()){Ext.Array.forEach(this.getLayoutItems(),function(a){Ext.fly(a.el.dom.parentNode).setWidth(a.getWidth())})}if(Ext.isIE6||(Ext.isIEQuirks)){this.owner.getTargetEl().child("table").repaint()}},calculateCells:function(k){var m=[],b=0,d=0,a=0,h=this.columns||Infinity,n=[],e=0,c,g=k.length,l;for(;e<g;e++){l=k[e];while(d>=h||n[d]>0){if(d>=h){d=0;a=0;b++;for(c=0;c<h;c++){if(n[c]>0){n[c]--}}}else{d++}}m.push({rowIdx:b,cellIdx:a});for(c=l.colspan||1;c;--c){n[d]=l.rowspan||1;++d}++a}return m},getRenderTree:function(){var k=this,h=k.getLayoutItems(),o,p=[],q=Ext.apply({tag:"table",role:"presentation",cls:k.tableCls,cellspacing:0,cn:{tag:"tbody",cn:p}},k.tableAttrs),c=k.tdAttrs,d=k.needsDivWrap(),e,g=h.length,n,m,j,b,a,l;o=k.calculateCells(h);for(e=0;e<g;e++){n=h[e];m=o[e];b=m.rowIdx;a=m.cellIdx;j=p[b];if(!j){j=p[b]={tag:"tr",cn:[]};if(k.trAttrs){Ext.apply(j,k.trAttrs)}}l=j.cn[a]={tag:"td"};if(c){Ext.apply(l,c)}Ext.apply(l,{colSpan:n.colspan||1,rowSpan:n.rowspan||1,id:n.cellId||"",cls:k.cellCls+" "+(n.cellCls||"")});if(d){l=l.cn={tag:"div"}}k.configureItem(n);l.cn=n.getRenderTree()}return q},isValidParent:function(g,h,e,d){var b,a,c;if(arguments.length===3){c=g.el.up("table").dom;return c&&c.parentNode===h.dom}b=this.owner.getTargetEl().child("table",true).tBodies[0];a=b.rows[e].cells[d];return h.dom===a},needsDivWrap:function(){return Ext.isOpera10_5}});Ext.define("Ext.layout.container.boxOverflow.Scroller",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.util.ClickRepeater","Ext.Element"],alternateClassName:"Ext.layout.boxOverflow.Scroller",mixins:{observable:"Ext.util.Observable"},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+"box-scroller",constructor:function(c,a){var b=this;b.layout=c;Ext.apply(b,a||{});b.addEvents("scroll");b.scrollPosition=0},getPrefixConfig:function(){var a=this;a.initCSSClasses();return{cls:Ext.layout.container.Box.prototype.innerCls+" "+a.beforeCtCls,cn:{id:a.layout.owner.id+"-before-scroller",cls:a.scrollerCls+" "+a.beforeScrollerCls,style:"display:none"}}},getSuffixConfig:function(){var a=this;return{cls:Ext.layout.container.Box.prototype.innerCls+" "+a.afterCtCls,cn:{id:a.layout.owner.id+"-after-scroller",cls:a.scrollerCls+" "+a.afterScrollerCls,style:"display:none"}}},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},initCSSClasses:function(){var c=this,d=Ext.baseCSSPrefix,b=c.layout,e=b.getNames(),a=e.left,g=e.right;c.beforeCtCls=c.beforeCtCls||d+"box-scroller-"+a;c.afterCtCls=c.afterCtCls||d+"box-scroller-"+g;c.beforeScrollerCls=c.beforeScrollerCls||d+b.owner.getXType()+"-scroll-"+a;c.afterScrollerCls=c.afterScrollerCls||d+b.owner.getXType()+"-scroll-"+g},handleOverflow:function(d){var c=this,b=c.layout,e=b.getNames(),a="get"+e.widthCap;c.captureChildElements();c.showScrollers();return{reservedSpace:c.beforeCt[a]()+c.afterCt[a]()}},captureChildElements:function(){var b=this,a=b.layout.owner.el,c,d;if(!b.beforeCt){c=b.beforeScroller=a.getById(b.layout.owner.id+"-before-scroller");d=b.afterScroller=a.getById(b.layout.owner.id+"-after-scroller");b.beforeCt=c.up("");b.afterCt=d.up("");b.createWheelListener();c.addClsOnOver(b.beforeScrollerCls+"-hover");d.addClsOnOver(b.afterScrollerCls+"-hover");c.setVisibilityMode(Ext.Element.DISPLAY);d.setVisibilityMode(Ext.Element.DISPLAY);b.beforeRepeater=new Ext.util.ClickRepeater(c,{interval:b.scrollRepeatInterval,handler:b.scrollLeft,scope:b});b.afterRepeater=new Ext.util.ClickRepeater(d,{interval:b.scrollRepeatInterval,handler:b.scrollRight,scope:b})}},createWheelListener:function(){this.layout.innerCt.on({mousewheel:function(a){this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)},stopEvent:true,scope:this})},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){var a=this;a.captureChildElements();a.beforeScroller.show();a.afterScroller.show();a.updateScrollButtons();a.layout.owner.addClsWithUI("scroller")},hideScrollers:function(){var a=this;if(a.beforeScroller!==undefined){a.beforeScroller.hide();a.afterScroller.hide();a.layout.owner.removeClsWithUI("scroller")}},destroy:function(){var a=this;Ext.destroy(a.beforeRepeater,a.afterRepeater,a.beforeScroller,a.afterScroller,a.beforeCt,a.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){var d=this,e,c,a,b;if(d.beforeScroller===undefined||d.afterScroller===undefined){return}e=d.atExtremeBefore()?"addCls":"removeCls";c=d.atExtremeAfter()?"addCls":"removeCls";a=d.beforeScrollerCls+"-disabled";b=d.afterScrollerCls+"-disabled";d.beforeScroller[e](a);d.afterScroller[c](b);d.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var c=this,b=c.layout,a;if(c.hasOwnProperty("scrollPosition")){a=c.scrollPosition}else{a=parseInt(b.innerCt.dom["scroll"+b.getNames().leftCap],10)||0}return a},getMaxScrollPosition:function(){var b=this.layout,c=b.getNames(),a=c.widthCap;return b.innerCt.dom["scroll"+a]-this.layout.innerCt["get"+a]()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollPosition()},scrollTo:function(a,b){var g=this,e=g.layout,h=e.getNames(),d=g.getScrollPosition(),c=Ext.Number.constrain(a,0,g.getMaxScrollPosition());if(c!=d&&!g.scrolling){delete g.scrollPosition;if(b===undefined){b=g.animateScroll}e.innerCt.scrollTo(h.left,c,b?g.getScrollAnim():false);if(b){g.scrolling=true}else{g.updateScrollButtons()}g.fireEvent("scroll",g,c,b?g.getScrollAnim():false)}},scrollToItem:function(h,b){var g=this,e=g.layout,i=e.getNames(),a,d,c;h=g.getItem(h);if(h!==undefined){a=g.getItemVisibility(h);if(!a.fullyVisible){d=h.getBox(true,true);c=d[i.x];if(a.hiddenEnd){c-=(g.layout.innerCt["get"+i.widthCap]()-d[i.width])}g.scrollTo(c,b)}}},getItemVisibility:function(j){var h=this,b=h.getItem(j).getBox(true,true),c=h.layout,g=c.getNames(),e=b[g.x],d=e+b[g.width],a=h.getScrollPosition(),i=a+c.innerCt["get"+g.widthCap]();return{hiddenStart:e<a,hiddenEnd:d>i,fullyVisible:e>a&&d<i}}});Ext.define("Ext.menu.Item",{extend:"Ext.Component",alias:"widget.menuitem",alternateClassName:"Ext.menu.TextItem",activeCls:Ext.baseCSSPrefix+"menu-item-active",ariaRole:"menuitem",canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+"menu-item-disabled",hideOnClick:true,isMenuItem:true,menuAlign:"tl-tr?",menuExpandDelay:200,menuHideDelay:200,arrowCls:Ext.baseCSSPrefix+"menu-item-arrow",childEls:["itemEl","iconEl","textEl","arrowEl"],renderTpl:['<tpl if="plain">',"{text}","<tpl else>",'<a id="{id}-itemEl" class="'+Ext.baseCSSPrefix+'menu-item-link" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on">','<img id="{id}-iconEl" src="{icon}" class="'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}" />','<span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'menu-item-text" <tpl if="arrowCls">style="margin-right: 17px;"</tpl> >{text}</span>','<img id="{id}-arrowEl" src="{blank}" class="{arrowCls}" />',"</a>","</tpl>"],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&&a.canActivate&&a.rendered&&!a.isDisabled()&&a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent("activate",a)}},getFocusEl:function(){return this.itemEl},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent("deactivate",a)}},deferExpandMenu:function(){var a=this;if(!a.menu.rendered||!a.menu.isVisible()){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},cancelDeferHide:function(){clearTimeout(this.hideMenuTimer)},deferHideParentMenus:function(){Ext.menu.Manager.hideAll()},expandMenu:function(a){var b=this;if(b.menu){b.cancelDeferHide();if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+"menu-item"],d;b.addEvents("activate","click","deactivate");if(b.plain){a.push(c+"menu-item-plain")}if(b.cls){a.push(b.cls)}b.cls=a.join(" ");if(b.menu){d=b.menu;delete b.menu;b.setMenu(d)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent("click",a,b);if(!a.hideOnClick){a.focus()}},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);a.cancelDeferHide();clearTimeout(a.deferHideParentMenusTimer);a.setMenu(null);a.callParent(arguments)},beforeRender:function(){var a=this,b=Ext.BLANK_IMAGE_URL;a.callParent();Ext.applyIf(a.renderData,{href:a.href||"#",hrefTarget:a.hrefTarget,icon:a.icon||b,iconCls:a.iconCls+(a.checkChangeDisabled?" "+a.disabledCls:""),plain:a.plain,text:a.text,arrowCls:a.menu?a.arrowCls:"",blank:b})},setMenu:function(d,c){var b=this,a=b.menu;if(a){delete a.parentItem;delete a.parentMenu;delete a.ownerCt;delete a.ownerItem;if(c===true||(c!==false&&b.destroyMenu)){Ext.destroy(a)}}if(d){b.menu=Ext.menu.Manager.get(d);b.menu.ownerItem=b}else{b.menu=null}if(b.rendered&&!b.destroying){b.arrowEl[b.menu?"addCls":"removeCls"](b.arrowCls)}},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIcon:function(b){var a=this.iconEl;if(a){a.src=b||Ext.BLANK_IMAGE_URL}this.icon=b},setIconCls:function(b){var c=this,a=c.iconEl;if(a){if(c.iconCls){a.removeCls(c.iconCls)}if(b){a.addCls(b)}}c.iconCls=b},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||"");b.ownerCt.updateLayout()}}});Ext.define("Ext.menu.CheckItem",{extend:"Ext.menu.Item",alias:"widget.menucheckitem",checkedCls:Ext.baseCSSPrefix+"menu-item-checked",uncheckedCls:Ext.baseCSSPrefix+"menu-item-unchecked",groupCls:Ext.baseCSSPrefix+"menu-group-icon",hideOnClick:false,checkChangeDisabled:false,afterRender:function(){var a=this;a.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true);if(a.checkChangeDisabled){a.disableCheckChange()}},initComponent:function(){var a=this;a.addEvents("beforecheckchange","checkchange");a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.addCls(b.disabledCls)}b.checkChangeDisabled=true},enableCheckChange:function(){var b=this,a=b.iconEl;if(a){a.removeCls(b.disabledCls)}b.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&&!a.checkChangeDisabled&&!(a.checked&&a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&&(a||b.fireEvent("beforecheckchange",b,c)!==false)){if(b.el){b.el[c?"addCls":"removeCls"](b.checkedCls)[!c?"addCls":"removeCls"](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent("checkchange",b,c)}}}});Ext.define("Ext.menu.Manager",{singleton:true,requires:["Ext.util.MixedCollection","Ext.util.KeyMap"],alternateClassName:"Ext.menu.MenuMgr",uses:["Ext.menu.Menu"],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=new Ext.util.MixedCollection();Ext.getDoc().addKeyListener(27,function(){if(a.active.length>0){a.hideAll()}},a)},hideAll:function(){var a=this.active,b;if(a&&a.length>0){b=a.clone();b.each(function(c){c.hide()});return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length<1){Ext.getDoc().un("mousedown",b.onMouseDown,b);b.attached=false}},onShow:function(a){var e=this,g=e.active,d=g.last(),c=e.attached,b=a.getEl(),h;e.lastShow=new Date();g.add(a);if(!c){Ext.getDoc().on("mousedown",e.onMouseDown,e);e.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&&!a.allowOtherMenus){this.hideAll()}else{if(b&&b.activeChild&&a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(g){var b=this,d=b.active,a=b.lastShow,c=g.target;if(Ext.Date.getElapsed(a)>50&&d.length>0&&!g.getTarget("."+Ext.baseCSSPrefix+"menu")){b.hideAll();if(Ext.isIE&&Ext.fly(c).focusable()){c.focus()}}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b=="string"){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return new Ext.menu.Menu({items:b})}else{return Ext.ComponentManager.create(b,"menu")}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,g){var a=this.groups,c=d.group,b=0,j,e,h;if(c&&g){j=a[c];e=j.length;for(;b<e;b++){h=j[b];if(h!=d){h.setChecked(false)}}}}});Ext.define("Ext.button.Button",{alias:"widget.button",extend:"Ext.Component",requires:["Ext.menu.Manager","Ext.util.ClickRepeater","Ext.layout.component.Button","Ext.util.TextMetrics","Ext.util.KeyMap"],alternateClassName:"Ext.Button",isButton:true,componentLayout:"button",hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",textAlign:"center",type:"button",clickEvent:"click",preventDefault:true,handleMouseEvents:true,tooltipType:"qtip",baseCls:Ext.baseCSSPrefix+"btn",pressedCls:"pressed",overCls:"over",focusCls:"focus",menuActiveCls:"menu-active",hrefTarget:"_blank",childEls:["btnEl","btnWrap","btnInnerEl","btnIconEl"],renderTpl:['<em id="{id}-btnWrap"<tpl if="splitCls"> class="{splitCls}"</tpl>>','<tpl if="href">','<a id="{id}-btnEl" href="{href}" class="{btnCls}" target="{hrefTarget}"<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="link">','<span id="{id}-btnInnerEl" class="{baseCls}-inner">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>></span>',"</a>","<tpl else>",'<button id="{id}-btnEl" type="{type}" class="{btnCls}" hidefocus="true"','<tpl if="tabIndex"> tabIndex="{tabIndex}"</tpl> role="button" autocomplete="off">','<span id="{id}-btnInnerEl" class="{baseCls}-inner" style="{innerSpanStyle}">',"{text}","</span>",'<span id="{id}-btnIconEl" class="{baseCls}-icon {iconCls}"<tpl if="iconUrl"> style="background-image:url({iconUrl})"</tpl>>&#160;</span>',"</button>","</tpl>","</em>",'<tpl if="closable">','<a id="{id}-closeEl" href="#" class="{baseCls}-close-btn" title="{closeText}"></a>',"</tpl>"],scale:"small",allowedScales:["small","medium","large"],iconAlign:"left",arrowAlign:"right",arrowCls:"arrow",maskOnDisable:false,persistentPadding:undefined,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("click","toggle","mouseover","mouseout","menushow","menuhide","menutriggerover","menutriggerout");if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerButton=a}if(a.url){a.href=a.url}if(a.href&&!a.hasOwnProperty("preventDefault")){a.preventDefault=false}if(Ext.isString(a.toggleGroup)){a.enableToggle=true}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.inOnFocus?this.el:this.btnEl},onFocus:function(b){var a=this;a.inOnFocus=true;a.callParent(arguments);a.inOnFocus=false},onBlur:function(c){var b=this,a=b.focusCls,d=b.getEl();if(b.destroying){return}b.beforeBlur(c);if(a&&d){d.removeCls(b.removeClsWithUI(a,true))}if(b.validateOnBlur){b.validate()}b.hasFocus=false;b.fireEvent("blur",b,c);b.postBlur(c)},setComponentCls:function(){var b=this,a=b.getComponentCls();if(!Ext.isEmpty(b.oldCls)){b.removeClsWithUI(b.oldCls);b.removeClsWithUI(b.pressedCls)}b.oldCls=a;b.addClsWithUI(a)},getComponentCls:function(){var b=this,a=[];if(b.iconCls||b.icon){if(b.text){a.push("icon-text-"+b.iconAlign)}else{a.push("icon")}}else{if(b.text){a.push("noicon")}}if(b.pressed){a.push(b.pressedCls)}return a},beforeRender:function(){var a=this;a.callParent();a.oldCls=a.getComponentCls();a.addClsWithUI(a.oldCls);Ext.applyIf(a.renderData,a.getTemplateArgs());if(a.scale){a.setScale(a.scale)}},onRender:function(){var c=this,a,b;c.doc=Ext.getDoc();c.callParent(arguments);if(c.split&&c.arrowTooltip){c.arrowEl.dom.setAttribute(c.getTipAttr(),c.arrowTooltip)}a=c.el;if(c.tooltip){c.setTooltip(c.tooltip,true)}if(c.handleMouseEvents){b={scope:c,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousedown:c.onMouseDown};if(c.split){b.mousemove=c.onMouseMove}}else{b={}}if(c.menu){c.mon(c.menu,{scope:c,show:c.onMenuShow,hide:c.onMenuHide});c.keyMap=new Ext.util.KeyMap(c.el,{key:Ext.EventObject.DOWN,handler:c.onDownKey,scope:c})}if(c.repeat){c.mon(new Ext.util.ClickRepeater(a,Ext.isObject(c.repeat)?c.repeat:{}),"click",c.onRepeatClick,c)}else{b[c.clickEvent]=c.onClick}c.mon(a,b);Ext.ButtonToggleManager.register(c)},getTemplateArgs:function(){var c=this,b=c.getPersistentPadding(),a="";if(Math.max.apply(Math,b)>0){a="margin:"+Ext.Array.map(b,function(d){return -d+"px"}).join(" ")}return{href:c.getHref(),hrefTarget:c.hrefTarget,type:c.type,btnCls:c.getBtnCls(),splitCls:c.getSplitCls(),iconUrl:c.icon,iconCls:c.iconCls,text:c.text||"&#160;",tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+"-"+a.arrowCls)+" "+(a.baseCls+"-"+a.arrowCls+"-"+a.arrowAlign):""},getBtnCls:function(){return this.align?this.baseCls+"-"+this.align:""},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||"");d.setComponentCls();if(d.didIconStateChange(c,b)){d.updateLayout()}}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+"-"+b.textAlign);a.addCls(b.baseCls+"-"+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType=="qtip"?"data-qtip":"title"},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&&a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un("mouseover",a.monitorMouseOver,a);a.doc.un("mouseup",a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.rendered){a.btnInnerEl.update(b||"&#160;");a.setComponentCls();if(Ext.isStrict&&Ext.isIE8){a.el.repaint()}a.updateLayout()}return a},setIcon:function(b){var c=this,a=c.btnIconEl,d=c.icon;c.icon=b;if(a){a.setStyle("background-image",b?"url("+b+")":"");c.setComponentCls();if(c.didIconStateChange(d,b)){c.updateLayout()}}return c},didIconStateChange:function(a,c){var b=Ext.isEmpty(c);return Ext.isEmpty(a)?!b:b},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?"addClsWithUI":"removeClsWithUI"](b.pressedCls)}b.pressed=c;if(!a){b.fireEvent("toggle",b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&&!a.hasVisibleMenu()&&!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&&a.menu){if(a.tooltip&&a.getTipAttr()!="title"){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign,((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)?[-2,-2]:undefined)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&&a.rendered&&a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&&a.getHref())&&b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;if(b.fireEvent("click",b,c)!==false){if(a){a.call(b.scope||b,b,c)}b.blur()}},doToggle:function(){var a=this;if(a.enableToggle&&(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&&!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(h){var d=this,c=d.el,g=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign==="right"){b=h.getX()-c.getX();a=c.getWidth()}else{b=h.getY()-c.getY();a=c.getHeight()}if(b>(a-d.getTriggerSize())){if(!g){d.onMenuTriggerOver(h)}}else{if(g){d.onMenuTriggerOut(h)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+(e.frameSize&&e.frameSize[b]||0)}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent("mouseover",a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent("mouseout",a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent("menutriggerover",a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent("menutriggerout",a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI("disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI("disabled");b.removeClsWithUI(b.overCls);return b},setScale:function(c){var a=this,b=a.ui.replace("-"+a.scale,"");if(!Ext.Array.contains(a.allowedScales,c)){throw ("#setScale: scale must be an allowed scale ("+a.allowedScales.join(", ")+")")}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&&!b.match(a.scale)){b=b+"-"+a.scale}a.callParent([b])},onMouseDown:function(b){var a=this;if(!a.disabled&&b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on("mouseup",a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un("mouseup",a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent("menushow",a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent("menuhide",a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentPadding:function(){var d=this,e=d.persistentPadding,b,a,c,g;if(!e){e=d.self.prototype.persistentPadding=[0,0,0,0];if(!Ext.isIE){b=new Ext.button.Button({text:"test",style:"position:absolute;top:-999px;"});b.el=Ext.DomHelper.append(Ext.getBody(),b.getRenderTree(),true);b.applyChildEls(b.el);c=b.btnEl;g=b.btnInnerEl;c.setSize(null,null);a=g.getOffsetsTo(c);e[0]=a[1];e[1]=c.getWidth()-g.getWidth()-a[0];e[2]=c.getHeight()-g.getHeight()-a[1];e[3]=a[0];b.destroy();b.el.remove()}}return e}},function(){var a={},b=function(d,j){if(j){var h=a[d.toggleGroup],e=h.length,c;for(c=0;c<e;c++){if(h[c]!==d){h[c].toggle(false)}}}};Ext.ButtonToggleManager={register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on("toggle",b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){Ext.Array.remove(d,c);c.un("toggle",b)}},getPressed:function(h){var e=a[h],d=0,c;if(e){for(c=e.length;d<c;d++){if(e[d].pressed===true){return e[d]}}}return null}}});Ext.define("Ext.button.Split",{alias:"widget.splitbutton",extend:"Ext.button.Button",alternateClassName:"Ext.SplitButton",arrowCls:"split",split:true,initComponent:function(){this.callParent();this.addEvents("arrowclick")},setArrowHandler:function(b,a){this.arrowHandler=b;this.scope=a},onClick:function(c,a){var b=this;c.preventDefault();if(!b.disabled){if(b.overMenuTrigger){b.maybeShowMenu();b.fireEvent("arrowclick",b,c);if(b.arrowHandler){b.arrowHandler.call(b.scope||b,b,c)}}else{b.doToggle();b.fireHandler(c)}}}});Ext.define("Ext.button.Cycle",{alias:"widget.cycle",extend:"Ext.button.Split",alternateClassName:"Ext.CycleButton",getButtonText:function(b){var a=this,c="";if(b&&a.showText===true){if(a.prependText){c+=a.prependText}c+=b.text;return c}return a.text},setActiveItem:function(c,a){var b=this;if(!Ext.isObject(c)){c=b.menu.getComponent(c)}if(c){if(!b.rendered){b.text=b.getButtonText(c);b.iconCls=c.iconCls}else{b.setText(b.getButtonText(c));b.setIconCls(c.iconCls)}b.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(b.forceIcon){b.setIconCls(b.forceIcon)}if(!a){b.fireEvent("change",b,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){var c=this,b=0,a;c.addEvents("change");if(c.changeHandler){c.on("change",c.changeHandler,c.scope||c);delete c.changeHandler}a=(c.menu.items||[]).concat(c.items||[]);c.menu=Ext.applyIf({cls:Ext.baseCSSPrefix+"cycle-menu",items:[]},c.menu);Ext.each(a,function(e,d){e=Ext.applyIf({group:c.id,itemIndex:d,checkHandler:c.checkHandler,scope:c,checked:e.checked||false},e);c.menu.items.push(e);if(e.checked){b=d}});c.itemCount=c.menu.items.length;c.callParent(arguments);c.on("click",c.toggleSelected,c);c.setActiveItem(b,c);if(c.width&&c.showText){c.addCls(Ext.baseCSSPrefix+"cycle-fixed-width")}},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var c=this,a=c.menu,b;b=c.activeItem.next(":not([disabled])")||a.items.getAt(0);b.setChecked(true)}});Ext.define("Ext.menu.Separator",{extend:"Ext.menu.Item",alias:"widget.menuseparator",canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+"menu-item-separator",text:"&#160;",beforeRender:function(a,c){var b=this;b.callParent();b.addCls(b.separatorCls)}});Ext.define("Ext.panel.DD",{extend:"Ext.dd.DragSource",requires:["Ext.panel.Proxy"],constructor:function(b,a){var c=this;c.panel=b;c.dragData={panel:b};c.panelProxy=new Ext.panel.Proxy(b,a);c.proxy=c.panelProxy.proxy;c.callParent([b.el,a]);c.setupEl(b)},setupEl:function(a){var c=this,d=a.header,b=a.body;if(d){c.setHandleElId(d.id);b=d.el}if(b){b.setStyle("cursor","move");c.scroll=false}else{a.on("boxready",c.setupEl,c,{single:true})}},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.panelProxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.panelProxy.ghost.el.dom},endDrag:function(a){this.panelProxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.define("Ext.panel.Header",{extend:"Ext.container.Container",uses:["Ext.panel.Tool","Ext.draw.Component","Ext.util.CSS","Ext.layout.component.Body","Ext.Img"],alias:"widget.header",isHeader:true,defaultType:"tool",indicateDrag:false,weight:-1,componentLayout:"body",childEls:["body"],renderTpl:['<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>','<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"','<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>"],headingTpl:'<span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span>',shrinkWrap:3,initComponent:function(){var b=this,e,d,a,c;b.indicateDragCls=b.baseCls+"-draggable";b.title=b.title||"&#160;";b.tools=b.tools||[];b.items=b.items||[];b.orientation=b.orientation||"horizontal";b.dock=(b.dock)?b.dock:(b.orientation=="horizontal")?"top":"left";b.addClsWithUI([b.orientation,b.dock]);if(b.indicateDrag){b.addCls(b.indicateDragCls)}if(!Ext.isEmpty(b.iconCls)||!Ext.isEmpty(b.icon)){b.initIconCmp();b.items.push(b.iconCmp)}if(b.orientation=="vertical"){b.layout={type:"vbox",align:"center"};b.textConfig={width:15,cls:b.baseCls+"-text",type:"text",text:b.title,rotate:{degrees:90}};c=b.ui;if(Ext.isArray(c)){c=c[0]}e="."+b.baseCls+"-text-"+c;if(Ext.scopeResetCSS){e="."+Ext.baseCSSPrefix+"reset "+e}d=Ext.util.CSS.getRule(e);if(d){a=d.style}if(a){Ext.apply(b.textConfig,{"font-family":a.fontFamily,"font-weight":a.fontWeight,"font-size":a.fontSize,fill:a.color})}b.titleCmp=new Ext.draw.Component({width:15,ariaRole:"heading",focusable:false,viewBox:false,flex:1,id:b.id+"_hd",autoSize:true,margins:"5 0 0 0",items:[b.textConfig],xhooks:{setSize:function(g){this.callParent([g])}},childEls:[{name:"textEl",select:"."+b.baseCls+"-text"}]})}else{b.layout={type:"hbox",align:"middle"};b.titleCmp=new Ext.Component({height:15,xtype:"component",ariaRole:"heading",focusable:false,noWrap:true,flex:1,id:b.id+"_hd",cls:b.baseCls+"-text-container",renderTpl:b.getTpl("headingTpl"),renderData:{title:b.title,cls:b.baseCls,ui:b.ui},childEls:["textEl"]})}b.items.push(b.titleCmp);b.items=b.items.concat(b.tools);b.callParent();b.on({click:b.onClick,element:"el",scope:b})},initIconCmp:function(){var b=this,a={width:15,height:15,focusable:false,src:Ext.BLANK_IMAGE_URL,cls:[b.baseCls+"-icon",b.iconCls],id:b.id+"-iconEl",iconCls:b.iconCls};if(!Ext.isEmpty(b.icon)){delete a.iconCls;a.src=b.icon}b.iconCmp=new Ext.Img(a)},afterRender:function(){this.el.unselectable();this.callParent()},addUIClsToElement:function(b,g){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){if(!Ext.Array.contains(h,d[c])){h.push(d[c])}}e.bodyCls=h.join(" ")}else{e.bodyCls=d.join(" ")}}return a},removeUIClsFromElement:function(b,g){var e=this,a=e.callParent(arguments),d=[e.baseCls+"-body-"+b,e.baseCls+"-body-"+e.ui+"-"+b],h,c;if(!g&&e.rendered){if(e.bodyCls){e.body.removeCls(e.bodyCls)}else{e.body.removeCls(d)}}else{if(e.bodyCls){h=e.bodyCls.split(" ");for(c=0;c<d.length;c++){Ext.Array.remove(h,d[c])}e.bodyCls=h.join(" ")}}return a},addUIToElement:function(c){var b=this,d,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(!c&&b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){d=b.bodyCls.split(" ");if(!Ext.Array.contains(d,a)){d.push(a)}b.bodyCls=d.join(" ")}else{b.bodyCls=a}}if(!c&&b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.addCls(b.baseCls+"-text-"+b.ui)}},removeUIFromElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+"-body-"+b.ui;if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(" ");Ext.Array.remove(c,a);b.bodyCls=c.join(" ")}else{b.bodyCls=a}}if(b.titleCmp&&b.titleCmp.rendered&&b.titleCmp.textEl){b.titleCmp.textEl.removeCls(b.baseCls+"-text-"+b.ui)}},onClick:function(a){if(!a.getTarget(Ext.baseCSSPrefix+"tool")){this.fireEvent("click",a)}},getFocusEl:function(){return this.el},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(d){var c=this,b,a;if(c.rendered){if(c.titleCmp.rendered){if(c.titleCmp.surface){c.title=d||"";b=c.titleCmp.surface.items.items[0];a=c.titleCmp.surface;a.remove(b);c.textConfig.type="text";c.textConfig.text=d;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:90}},true);c.titleCmp.autoSizeSurface()}else{c.title=d;c.titleCmp.textEl.update(c.title||"&#160;")}}else{c.titleCmp.on({render:function(){c.setTitle(d)},single:true})}}else{c.title=d}},getMinWidth:function(){var e=this,d=e.titleCmp.textEl.dom,a,g=e.tools,b,c;d.style.display="inline";a=d.offsetWidth;d.style.display="";if(g&&(b=g.length)){for(c=0;c<b;c++){if(g[c].el){a+=g[c].el.dom.offsetWidth}}}if(e.iconCmp){a+=e.iconCmp.el.dom.offsetWidth}return a+10},setIconCls:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.iconCls=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.removeCls(c.iconCls);c.addCls(a);c.iconCls=a}}}},setIcon:function(a){var b=this,d=!a||!a.length,c=b.iconCmp;b.icon=a;if(!b.iconCmp&&!d){b.initIconCmp();b.insert(0,b.iconCmp)}else{if(c){if(d){b.iconCmp.destroy();delete b.iconCmp}else{c.setSrc(b.icon)}}}},addTool:function(a){this.tools.push(this.add(a))},onAdd:function(b,a){this.callParent(arguments);if(b instanceof Ext.panel.Tool){b.bindTo(this.ownerCt);this.tools[b.type]=b}}});Ext.define("Ext.picker.Color",{extend:"Ext.Component",requires:"Ext.XTemplate",alias:"widget.colorpicker",alternateClassName:"Ext.ColorPalette",componentCls:Ext.baseCSSPrefix+"color-picker",selectedCls:Ext.baseCSSPrefix+"color-picker-selected",value:null,clickEvent:"click",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],colorRe:/(?:^|\s)color-(.{6})(?:\s|$)/,renderTpl:['<tpl for="colors">','<a href="#" class="color-{.}" hidefocus="on">','<em><span style="background:#{.}" unselectable="on">&#160;</span></em>',"</a>","</tpl>"],initComponent:function(){var a=this;a.callParent(arguments);a.addEvents("select");if(a.handler){a.on("select",a.handler,a.scope,true)}},initRenderData:function(){var a=this;return Ext.apply(a.callParent(),{itemCls:a.itemCls,colors:a.colors})},onRender:function(){var b=this,a=b.clickEvent;b.callParent(arguments);b.mon(b.el,a,b.handleClick,b,{delegate:"a"});if(a!="click"){b.mon(b.el,"click",Ext.emptyFn,b,{delegate:"a",stopEvent:true})}},afterRender:function(){var a=this,b;a.callParent(arguments);if(a.value){b=a.value;a.value=null;a.select(b,true)}},handleClick:function(c,d){var b=this,a;c.stopEvent();if(!b.disabled){a=d.className.match(b.colorRe)[1];b.select(a.toUpperCase())}},select:function(b,a){var d=this,g=d.selectedCls,e=d.value,c;b=b.replace("#","");if(!d.rendered){d.value=b;return}if(b!=e||d.allowReselect){c=d.el;if(d.value){c.down("a.color-"+e).removeCls(g)}c.down("a.color-"+b).addCls(g);d.value=b;if(a!==true){d.fireEvent("select",d,b)}}},getValue:function(){return this.value||null}});Ext.define("Ext.picker.Month",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.util.ClickRepeater","Ext.Date","Ext.button.Button"],alias:"widget.monthpicker",alternateClassName:"Ext.MonthPicker",childEls:["bodyEl","prevEl","nextEl","buttonsEl"],renderTpl:['<div id="{id}-bodyEl" class="{baseCls}-body">','<div class="{baseCls}-months">','<tpl for="months">','<div class="{parent.baseCls}-item {parent.baseCls}-month"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="{baseCls}-years">','<div class="{baseCls}-yearnav">','<button id="{id}-prevEl" class="{baseCls}-yearnav-prev"></button>','<button id="{id}-nextEl" class="{baseCls}-yearnav-next"></button>',"</div>",'<tpl for="years">','<div class="{parent.baseCls}-item {parent.baseCls}-year"><a href="#" hidefocus="on">{.}</a></div>',"</tpl>","</div>",'<div class="'+Ext.baseCSSPrefix+'clear"></div>',"</div>",'<tpl if="showButtons">','<div id="{id}-buttonsEl" class="{baseCls}-buttons"></div>',"</tpl>"],okText:"OK",cancelText:"Cancel",baseCls:Ext.baseCSSPrefix+"monthpicker",showButtons:true,width:178,smallCls:Ext.baseCSSPrefix+"monthpicker-small",totalYears:10,yearOffset:5,monthOffset:6,initComponent:function(){var a=this;a.selectedCls=a.baseCls+"-selected";a.addEvents("cancelclick","monthclick","monthdblclick","okclick","select","yearclick","yeardblclick");if(a.small){a.addCls(a.smallCls)}a.setValue(a.value);a.activeYear=a.getYear(new Date().getFullYear()-4,-4);this.callParent()},beforeRender:function(){var e=this,c=0,b=[],a=Ext.Date.getShortMonthName,d=e.monthOffset;e.callParent();for(;c<d;++c){b.push(a(c),a(c+d))}Ext.apply(e.renderData,{months:b,years:e.getYears(),showButtons:e.showButtons})},afterRender:function(){var b=this,a=b.bodyEl,c=b.buttonsEl;b.callParent();b.mon(a,"click",b.onBodyClick,b);b.mon(a,"dblclick",b.onBodyClick,b);b.years=a.select("."+b.baseCls+"-year a");b.months=a.select("."+b.baseCls+"-month a");if(b.showButtons){b.okBtn=new Ext.button.Button({text:b.okText,renderTo:c,handler:b.onOkClick,scope:b});b.cancelBtn=new Ext.button.Button({text:b.cancelText,renderTo:c,handler:b.onCancelClick,scope:b})}b.backRepeater=new Ext.util.ClickRepeater(b.prevEl,{handler:Ext.Function.bind(b.adjustYear,b,[-b.totalYears])});b.prevEl.addClsOnOver(b.baseCls+"-yearnav-prev-over");b.nextRepeater=new Ext.util.ClickRepeater(b.nextEl,{handler:Ext.Function.bind(b.adjustYear,b,[b.totalYears])});b.nextEl.addClsOnOver(b.baseCls+"-yearnav-next-over");b.updateBody()},setValue:function(d){var c=this,e=c.activeYear,g=c.monthOffset,b,a;if(!d){c.value=[null,null]}else{if(Ext.isDate(d)){c.value=[d.getMonth(),d.getFullYear()]}else{c.value=[d[0],d[1]]}}if(c.rendered){b=c.value[1];if(b!==null){if((b<e||b>e+c.yearOffset)){c.activeYear=b-c.yearOffset+1}}c.updateBody()}return c},getValue:function(){return this.value},hasSelection:function(){var a=this.value;return a[0]!==null&&a[1]!==null},getYears:function(){var d=this,e=d.yearOffset,g=d.activeYear,a=g+e,c=g,b=[];for(;c<a;++c){b.push(c,c+e)}return b},updateBody:function(){var e=this,b=e.years,a=e.months,i=e.getYears(),j=e.selectedCls,g=e.getYear(null),c=e.value[0],h=e.monthOffset,d;if(e.rendered){b.removeCls(j);a.removeCls(j);b.each(function(m,l,k){d=i[k];m.dom.innerHTML=d;if(d==g){m.dom.className=j}});if(c!==null){if(c<h){c=c*2}else{c=(c-h)*2+1}a.item(c).addCls(j)}}},getYear:function(a,c){var b=this.value[1];c=c||0;return b===null?a:b+c},onBodyClick:function(d,b){var c=this,a=d.type=="dblclick";if(d.getTarget("."+c.baseCls+"-month")){d.stopEvent();c.onMonthClick(b,a)}else{if(d.getTarget("."+c.baseCls+"-year")){d.stopEvent();c.onYearClick(b,a)}}},adjustYear:function(a){if(typeof a!="number"){a=this.totalYears}this.activeYear+=a;this.updateBody()},onOkClick:function(){this.fireEvent("okclick",this,this.value)},onCancelClick:function(){this.fireEvent("cancelclick",this)},onMonthClick:function(c,a){var b=this;b.value[0]=b.resolveOffset(b.months.indexOf(c),b.monthOffset);b.updateBody();b.fireEvent("month"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},onYearClick:function(c,a){var b=this;b.value[1]=b.activeYear+b.resolveOffset(b.years.indexOf(c),b.yearOffset);b.updateBody();b.fireEvent("year"+(a?"dbl":"")+"click",b,b.value);b.fireEvent("select",b,b.value)},resolveOffset:function(a,b){if(a%2===0){return(a/2)}else{return b+Math.floor(a/2)}},beforeDestroy:function(){var a=this;a.years=a.months=null;Ext.destroyMembers(a,"backRepeater","nextRepeater","okBtn","cancelBtn");a.callParent()}});Ext.define("Ext.picker.Date",{extend:"Ext.Component",requires:["Ext.XTemplate","Ext.button.Button","Ext.button.Split","Ext.util.ClickRepeater","Ext.util.KeyNav","Ext.EventObject","Ext.fx.Manager","Ext.picker.Month"],alias:"widget.datepicker",alternateClassName:"Ext.DatePicker",childEls:["inner","eventEl","prevEl","nextEl","middleBtnEl","footerEl"],renderTpl:['<div id="{id}-inner">','<div role="presentation" class="{baseCls}-header">','<div class="{baseCls}-prev"><a id="{id}-prevEl" href="#" role="button" title="{prevText}"></a></div>','<div class="{baseCls}-month" id="{id}-middleBtnEl">{%this.renderMonthBtn(values, out)%}</div>','<div class="{baseCls}-next"><a id="{id}-nextEl" href="#" role="button" title="{nextText}"></a></div>',"</div>",'<table id="{id}-eventEl" class="{baseCls}-inner" cellspacing="0" role="presentation">','<thead role="presentation"><tr role="presentation">','<tpl for="dayNames">','<th role="columnheader" title="{.}"><span>{.:this.firstInitial}</span></th>',"</tpl>","</tr></thead>",'<tbody role="presentation"><tr role="presentation">','<tpl for="days">',"{#:this.isEndOfWeek}",'<td role="gridcell" id="{[Ext.id()]}">','<a role="presentation" href="#" hidefocus="on" class="{parent.baseCls}-date" tabIndex="1">','<em role="presentation"><span role="presentation"></span></em>',"</a>","</td>","</tpl>","</tr></tbody>","</table>",'<tpl if="showToday">','<div id="{id}-footerEl" role="presentation" class="{baseCls}-footer">{%this.renderTodayBtn(values, out)%}</div>',"</tpl>","</div>",{firstInitial:function(a){return a.substr(0,1)},isEndOfWeek:function(b){b--;var a=b%7===0&&b!==0;return a?'</tr><tr role="row">':""},longDay:function(a){return Ext.Date.format(a,this.longDayFormat)},renderTodayBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.todayBtn.getRenderTree(),b)},renderMonthBtn:function(a,b){Ext.DomHelper.generateMarkup(a.$comp.monthBtn.getRenderTree(),b)}}],todayText:"Today",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",disabledDaysText:"Disabled",disabledDatesText:"Disabled",nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,disableAnim:false,baseCls:Ext.baseCSSPrefix+"datepicker",longDayFormat:"F d, Y",focusOnShow:false,focusOnSelect:true,width:178,initHour:12,numDays:42,initComponent:function(){var b=this,a=Ext.Date.clearTime;b.selectedCls=b.baseCls+"-selected";b.disabledCellCls=b.baseCls+"-disabled";b.prevCls=b.baseCls+"-prevday";b.activeCls=b.baseCls+"-active";b.nextCls=b.baseCls+"-prevday";b.todayCls=b.baseCls+"-today";b.dayNames=b.dayNames.slice(b.startDay).concat(b.dayNames.slice(0,b.startDay));b.listeners=Ext.apply(b.listeners||{},{mousewheel:{element:"eventEl",fn:b.handleMouseWheel,scope:b},click:{element:"eventEl",fn:b.handleDateClick,scope:b,delegate:"a."+b.baseCls+"-date"}});this.callParent();b.value=b.value?a(b.value,true):a(new Date());b.addEvents("select");b.initDisabledDays()},beforeRender:function(){var b=this,c=new Array(b.numDays),a=Ext.Date.format(new Date(),b.format);b.monthBtn=new Ext.button.Split({ownerCt:b,ownerLayout:b.getComponentLayout(),text:"",tooltip:b.monthYearText,listeners:{click:b.showMonthPicker,arrowclick:b.showMonthPicker,scope:b}});if(this.showToday){b.todayBtn=new Ext.button.Button({ownerCt:b,ownerLayout:b.getComponentLayout(),text:Ext.String.format(b.todayText,a),tooltip:Ext.String.format(b.todayTip,a),handler:b.selectToday,scope:b})}b.callParent();Ext.applyIf(b,{renderData:{}});Ext.apply(b.renderData,{dayNames:b.dayNames,value:b.value,showToday:b.showToday,prevText:b.prevText,nextText:b.nextText,days:c});b.getTpl("renderTpl").longDayFormat=b.longDayFormat},finishRenderChildren:function(){this.callParent();this.monthBtn.finishRender();if(this.showToday){this.todayBtn.finishRender()}},onRender:function(b,a){var c=this;c.callParent(arguments);c.el.unselectable();c.cells=c.eventEl.select("tbody td");c.textNodes=c.eventEl.query("tbody td span")},initEvents:function(){var c=this,a=Ext.Date,b=a.DAY;this.callParent();c.prevRepeater=new Ext.util.ClickRepeater(c.prevEl,{handler:c.showPrevMonth,scope:c,preventDefault:true,stopDefault:true});c.nextRepeater=new Ext.util.ClickRepeater(c.nextEl,{handler:c.showNextMonth,scope:c,preventDefault:true,stopDefault:true});c.keyNav=new Ext.util.KeyNav(c.eventEl,Ext.apply({scope:c,left:function(d){if(d.ctrlKey){c.showPrevMonth()}else{c.update(a.add(c.activeDate,b,-1))}},right:function(d){if(d.ctrlKey){c.showNextMonth()}else{c.update(a.add(c.activeDate,b,1))}},up:function(d){if(d.ctrlKey){c.showNextYear()}else{c.update(a.add(c.activeDate,b,-7))}},down:function(d){if(d.ctrlKey){c.showPrevYear()}else{c.update(a.add(c.activeDate,b,7))}},pageUp:c.showNextMonth,pageDown:c.showPrevMonth,enter:function(d){d.stopPropagation();return true}},c.keyNavConfig));if(c.showToday){c.todayKeyListener=c.eventEl.addKeyListener(Ext.EventObject.SPACE,c.selectToday,c)}c.update(c.value)},initDisabledDays:function(){var d=this,b=d.disabledDates,c="(?:",a;if(!d.disabledDatesRE&&b){a=b.length-1;Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.String.escapeRegex(Ext.Date.dateFormat(g,d.format))+"$":b[e];if(e!=a){c+="|"}},d);d.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){var b=this;if(Ext.isArray(a)){b.disabledDates=a;b.disabledDatesRE=null}else{b.disabledDatesRE=a}b.initDisabledDays();b.update(b.value,true);return b},setDisabledDays:function(a){this.disabledDays=a;return this.update(this.value,true)},setMinDate:function(a){this.minDate=a;return this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;return this.update(this.value,true)},setValue:function(a){this.value=Ext.Date.clearTime(a,true);return this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(){this.callParent();this.setDisabledStatus(false);this.update(this.activeDate)},onDisable:function(){this.callParent();this.setDisabledStatus(true)},setDisabledStatus:function(a){var b=this;b.keyNav.setDisabled(a);b.prevRepeater.setDisabled(a);b.nextRepeater.setDisabled(a);if(b.showToday){b.todayKeyListener.setDisabled(a);b.todayBtn.setDisabled(a)}},getActive:function(){return this.activeDate||this.value},runAnimation:function(c){var b=this.monthPicker,a={duration:200,callback:function(){if(c){b.hide()}else{b.show()}}};if(c){b.el.slideOut("t",a)}else{b.el.slideIn("t",a)}},hideMonthPicker:function(a){var c=this,b=c.monthPicker;if(b){if(c.shouldAnimate(a)){c.runAnimation(true)}else{b.hide()}}return c},showMonthPicker:function(a){var c=this,b;if(c.rendered&&!c.disabled){b=c.createMonthPicker();b.setValue(c.getActive());b.setSize(c.getSize());b.setPosition(-1,-1);if(c.shouldAnimate(a)){c.runAnimation(false)}else{b.show()}}return c},shouldAnimate:function(a){return Ext.isDefined(a)?a:!this.disableAnim},createMonthPicker:function(){var b=this,a=b.monthPicker;if(!a){b.monthPicker=a=new Ext.picker.Month({renderTo:b.el,floating:true,shadow:false,small:b.showToday===false,listeners:{scope:b,cancelclick:b.onCancelClick,okclick:b.onOkClick,yeardblclick:b.onOkClick,monthdblclick:b.onOkClick}});if(!b.disableAnim){a.el.setStyle("display","none")}b.on("beforehide",Ext.Function.bind(b.hideMonthPicker,b,[false]))}return a},onOkClick:function(b,e){var d=this,g=e[0],c=e[1],a=new Date(c,g,d.getActive().getDate());if(a.getMonth()!==g){a=Ext.Date.getLastDateOfMonth(new Date(c,g,1))}d.update(a);d.hideMonthPicker()},onCancelClick:function(){this.selectedUpdate(this.activeDate);this.hideMonthPicker()},showPrevMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,-1))},showNextMonth:function(a){return this.update(Ext.Date.add(this.activeDate,Ext.Date.MONTH,1))},showPrevYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,-1))},showNextYear:function(){this.update(Ext.Date.add(this.activeDate,Ext.Date.YEAR,1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(d,a){var c=this,b=c.handler;d.stopEvent();if(!c.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasCls(c.disabledCellCls)){c.cancelFocus=c.focusOnSelect===false;c.setValue(new Date(a.dateValue));delete c.cancelFocus;c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}},onSelect:function(){if(this.hideOnSelect){this.hide()}},selectToday:function(){var c=this,a=c.todayBtn,b=c.handler;if(a&&!a.disabled){c.setValue(Ext.Date.clearTime(new Date()));c.fireEvent("select",c,c.value);if(b){b.call(c.scope||c,c,c.value)}c.onSelect()}return c},selectedUpdate:function(c){var e=this,d=c.getTime(),b=e.cells,a=e.selectedCls;b.removeCls(a);b.each(function(g){if(g.dom.firstChild.dateValue==d){e.fireEvent("highlightitem",e,g);g.addCls(a);if(e.isVisible()&&!e.cancelFocus){Ext.fly(g.dom.firstChild).focus(50)}return false}},this)},fullUpdate:function(A){var E=this,g=E.cells.elements,d=E.textNodes,G=E.disabledCellCls,n=Ext.Date,w=0,D=0,e=E.isVisible(),u=+n.clearTime(A,true),z=+n.clearTime(new Date()),t=E.minDate?n.clearTime(E.minDate,true):Number.NEGATIVE_INFINITY,v=E.maxDate?n.clearTime(E.maxDate,true):Number.POSITIVE_INFINITY,C=E.disabledDatesRE,s=E.disabledDatesText,H=E.disabledDays?E.disabledDays.join(""):false,B=E.disabledDaysText,x=E.format,l=n.getDaysInMonth(A),p=n.getFirstDateOfMonth(A),h=p.getDay()-E.startDay,y=n.add(A,n.MONTH,-1),b=E.longDayFormat,k,q,a,F,m,o,c,j,r;if(h<0){h+=7}l+=h;k=n.getDaysInMonth(y)-h;q=new Date(y.getFullYear(),y.getMonth(),k,E.initHour);if(E.showToday){F=n.clearTime(new Date());a=(F<t||F>v||(C&&x&&C.test(n.dateFormat(F,x)))||(H&&H.indexOf(F.getDay())!=-1));if(!E.disabled){E.todayBtn.setDisabled(a);E.todayKeyListener.setDisabled(a)}}m=function(i){r=+n.clearTime(q,true);i.title=n.format(q,b);i.firstChild.dateValue=r;if(r==z){i.className+=" "+E.todayCls;i.title=E.todayText}if(r==u){i.className+=" "+E.selectedCls;E.fireEvent("highlightitem",E,i);if(e&&E.floating){Ext.fly(i.firstChild).focus(50)}}if(r<t){i.className=G;i.title=E.minText;return}if(r>v){i.className=G;i.title=E.maxText;return}if(H){if(H.indexOf(q.getDay())!=-1){i.title=B;i.className=G}}if(C&&x){j=n.dateFormat(q,x);if(C.test(j)){i.title=s.replace("%0",j);i.className=G}}};for(;w<E.numDays;++w){if(w<h){o=(++k);c=E.prevCls}else{if(w>=l){o=(++D);c=E.nextCls}else{o=w-h+1;c=E.activeCls}}d[w].innerHTML=o;g[w].className=c;q.setDate(q.getDate()+1);m(g[w])}E.monthBtn.setText(E.monthNames[A.getMonth()]+" "+A.getFullYear())},update:function(a,d){var b=this,c=b.activeDate;if(b.rendered){b.activeDate=a;if(!d&&c&&b.el&&c.getMonth()==a.getMonth()&&c.getFullYear()==a.getFullYear()){b.selectedUpdate(a,c)}else{b.fullUpdate(a,c)}}return b},beforeDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.todayKeyListener,a.keyNav,a.monthPicker,a.monthBtn,a.nextRepeater,a.prevRepeater,a.todayBtn);delete a.textNodes;delete a.cells.elements}a.callParent()},onShow:function(){this.callParent(arguments);if(this.focusOnShow){this.focus()}}},function(){var b=this.prototype,a=Ext.Date;b.monthNames=a.monthNames;b.dayNames=a.dayNames;b.format=a.defaultFormat});Ext.define("Ext.form.field.Date",{extend:"Ext.form.field.Picker",alias:"widget.datefield",requires:["Ext.picker.Date"],alternateClassName:["Ext.form.DateField","Ext.form.Date"],format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerCls:Ext.baseCSSPrefix+"form-date-trigger",showToday:true,useStrict:false,initTime:"12",initTimeFormat:"H",matchFieldWidth:false,startDay:0,initComponent:function(){var d=this,b=Ext.isString,c,a;c=d.minValue;a=d.maxValue;if(b(c)){d.minValue=d.parseDate(c)}if(b(a)){d.maxValue=d.parseDate(a)}d.disabledDatesRE=null;d.initDisabledDays();d.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.String.escapeRegex(g.dateFormat(this.format))+"$":b[e];if(e!==a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){var c=this,b=c.picker;c.disabledDates=a;c.initDisabledDays();if(b){b.setDisabledDates(c.disabledDatesRE)}},setDisabledDays:function(a){var b=this.picker;this.disabledDays=a;if(b){b.setDisabledDays(a)}},setMinValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.minValue=d;if(a){a.minText=Ext.String.format(b.minText,b.formatDate(b.minValue));a.setMinDate(d)}},setMaxValue:function(c){var b=this,a=b.picker,d=(Ext.isString(c)?b.parseDate(c):c);b.maxValue=d;if(a){a.maxText=Ext.String.format(b.maxText,b.formatDate(b.maxValue));a.setMaxDate(d)}},getErrors:function(q){var j=this,p=Ext.String.format,k=Ext.Date.clearTime,o=j.callParent(arguments),n=j.disabledDays,d=j.disabledDatesRE,m=j.minValue,h=j.maxValue,g=n?n.length:0,e=0,a,b,l,c;q=j.formatDate(q||j.processRawValue(j.getRawValue()));if(q===null||q.length<1){return o}a=q;q=j.parseDate(q);if(!q){o.push(p(j.invalidText,a,j.format));return o}c=q.getTime();if(m&&c<k(m).getTime()){o.push(p(j.minText,j.formatDate(m)))}if(h&&c>k(h).getTime()){o.push(p(j.maxText,j.formatDate(h)))}if(n){l=q.getDay();for(;e<g;e++){if(l===n[e]){o.push(j.disabledDaysText);break}}}b=j.formatDate(q);if(d&&d.test(b)){o.push(p(j.disabledDatesText,b))}return o},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},safeParse:function(g,h){var e=this,c=Ext.Date,a=null,b=e.useStrict,d;if(c.formatContainsHourInfo(h)){a=c.parse(g,h,b)}else{d=c.parse(g+" "+e.initTime,h+" "+e.initTimeFormat,b);if(d){a=c.clearTime(d)}}return a},getSubmitValue:function(){var b=this.submitFormat||this.format,a=this.getValue();return a?Ext.Date.format(a,b):""},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},formatDate:function(a){return Ext.isDate(a)?Ext.Date.dateFormat(a,this.format):a},createPicker:function(){var a=this,b=Ext.String.format;return new Ext.picker.Date({pickerField:a,ownerCt:a.ownerCt,renderTo:document.body,floating:true,hidden:true,focusOnShow:true,minDate:a.minValue,maxDate:a.maxValue,disabledDatesRE:a.disabledDatesRE,disabledDatesText:a.disabledDatesText,disabledDays:a.disabledDays,disabledDaysText:a.disabledDaysText,format:a.format,showToday:a.showToday,startDay:a.startDay,minText:b(a.minText,a.formatDate(a.minValue)),maxText:b(a.maxText,a.formatDate(a.maxValue)),listeners:{scope:a,select:a.onSelect},keyNavConfig:{esc:function(){a.collapse()}}})},onSelect:function(a,c){var b=this;b.setValue(c);b.fireEvent("select",b,c);b.collapse()},onExpand:function(){var a=this.getValue();this.picker.setValue(Ext.isDate(a)?a:new Date())},onCollapse:function(){this.focus(false,60)},beforeBlur:function(){var c=this,a=c.parseDate(c.getRawValue()),b=c.focusTask;if(b){b.cancel()}if(a){c.setValue(a)}}});Ext.define("Ext.resizer.BorderSplitterTracker",{extend:"Ext.resizer.SplitterTracker",requires:["Ext.util.Region"],getPrevCmp:null,getNextCmp:null,calculateConstrainRegion:function(){var y=this,a=y.splitter,o=a.collapseTarget,d=a.defaultSplitMin,h=a.vertical?"Width":"Height",c="min"+h,u="max"+h,j="get"+h,t=a.neighbors,e=t.length,n=o.el.getBox(),g=n.x,p=n.y,x=n.right,k=n.bottom,r=a.vertical?(x-g):(k-p),w,l,m,v,s,q,b;m=(o[c]||Math.min(r,d))-r;v=o[u];if(!v){v=1000000000}else{v-=r}b=r;for(w=0;w<e;++w){l=t[w];r=l[j]();s=r-l[u];q=r-(l[c]||Math.min(r,d));if(!isNaN(s)){if(m<s){m=s}}if(v>q){v=q}}if(v-m<2){return null}n=new Ext.util.Region(p,x,k,g);y.constraintAdjusters[a.collapseDirection](n,m,v,a);y.dragInfo={minRange:m,maxRange:v,targetSize:b};return n},constraintAdjusters:{left:function(c,a,b,d){c[0]=c.x=c.left=c.right+a;c.right+=b+d.getWidth()},top:function(c,a,b,d){c[1]=c.y=c.top=c.bottom+a;c.bottom+=b+d.getHeight()},bottom:function(c,a,b,d){c.bottom=c.top-a;c.top-=b+d.getHeight()},right:function(c,a,b,d){c.right=c.left-a;c.left-=b+d.getWidth()}},onBeforeStart:function(h){var k=this,b=k.splitter,a=b.collapseTarget,m=b.neighbors,d=k.getSplitter().collapseEl,j=h.getTarget(),c=m.length,g,l;if(d&&j===b.collapseEl.dom){return false}if(a.collapsed){return false}for(g=0;g<c;++g){l=m[g];if(l.collapsed&&l.isHorz===a.isHorz){return false}}if(!(k.constrainTo=k.calculateConstrainRegion())){return false}k.createDragOverlay();return true},performResize:function(j,i){var k=this,b=k.splitter,h=b.collapseDirection,a=b.collapseTarget,g=k.splitAdjusters[b.vertical?"horz":"vert"],l=i[g.index],d=k.dragInfo,c;if(h=="right"||h=="bottom"){l=-l}l=Math.min(Math.max(d.minRange,l),d.maxRange);if(l){(c=b.ownerCt).suspendLayouts();g.adjustTarget(a,d.targetSize,l);c.resumeLayouts(true)}},splitAdjusters:{horz:{index:0,adjustTarget:function(b,a,c){b.setSize(a+c)}},vert:{index:1,adjustTarget:function(b,a,c){b.setSize(undefined,a+c)}}}});Ext.define("Ext.resizer.Handle",{extend:"Ext.Component",handleCls:"",baseHandleCls:Ext.baseCSSPrefix+"resizable-handle",region:"",beforeRender:function(){var a=this;a.callParent();a.addCls(a.baseHandleCls,a.baseHandleCls+"-"+a.region,a.handleCls)},onRender:function(){this.callParent(arguments);this.el.unselectable()}});Ext.define("Ext.resizer.Splitter",{extend:"Ext.Component",requires:["Ext.XTemplate"],uses:["Ext.resizer.SplitterTracker"],alias:"widget.splitter",childEls:["collapseEl"],renderTpl:['<tpl if="collapsible===true">','<div id="{id}-collapseEl" class="',Ext.baseCSSPrefix,"collapse-el ",Ext.baseCSSPrefix,'layout-split-{collapseDir}">&nbsp;</div>',"</tpl>"],baseCls:Ext.baseCSSPrefix+"splitter",collapsedClsInternal:Ext.baseCSSPrefix+"splitter-collapsed",collapsible:false,collapseOnDblClick:true,defaultSplitMin:40,defaultSplitMax:1000,width:5,height:5,collapseTarget:"next",horizontal:false,vertical:false,getTrackerConfig:function(){return{xclass:"Ext.resizer.SplitterTracker",el:this.el,splitter:this}},beforeRender:function(){var a=this,b=a.getCollapseTarget(),c=a.getCollapseDirection();a.callParent();if(b.collapsed){a.addCls(a.collapsedClsInternal)}a.addCls(a.baseCls+"-"+a.orientation);Ext.applyIf(a.renderData,{collapseDir:c,collapsible:a.collapsible||b.collapsible})},onRender:function(){var a=this;a.callParent(arguments);if(a.performCollapse!==false){if(a.renderData.collapsible){a.mon(a.collapseEl,"click",a.toggleTargetCmp,a)}if(a.collapseOnDblClick){a.mon(a.el,"dblclick",a.toggleTargetCmp,a)}}a.mon(a.getCollapseTarget(),{collapse:a.onTargetCollapse,expand:a.onTargetExpand,scope:a});a.el.unselectable();a.tracker=Ext.create(a.getTrackerConfig());a.relayEvents(a.tracker,["beforedragstart","dragstart","dragend"])},getCollapseDirection:function(){var g=this,c=g.collapseDirection,e,a,b,d;if(!c){e=g.collapseTarget;if(e.isComponent){c=e.collapseDirection}if(!c){d=g.ownerCt.layout.type;if(e.isComponent){b=g.ownerCt.items;a=Number(b.indexOf(e)==b.indexOf(g)-1)<<1|Number(d=="hbox")}else{a=Number(g.collapseTarget=="prev")<<1|Number(d=="hbox")}c=["bottom","right","top","left"][a]}g.collapseDirection=c}g.orientation=(c=="top"||c=="bottom")?"horizontal":"vertical";g[g.orientation]=true;return c},getCollapseTarget:function(){var a=this;return a.collapseTarget.isComponent?a.collapseTarget:a.collapseTarget=="prev"?a.previousSibling():a.nextSibling()},onTargetCollapse:function(a){this.el.addCls([this.collapsedClsInternal,this.collapsedCls])},onTargetExpand:function(a){this.el.removeCls([this.collapsedClsInternal,this.collapsedCls])},toggleTargetCmp:function(d,b){var c=this.getCollapseTarget(),g=c.placeholder,a;if(g&&!g.hidden){a=true}else{a=!c.hidden}if(a){if(c.collapsed){c.expand()}else{if(c.collapseDirection){c.collapse()}else{c.collapse(this.renderData.collapseDir)}}}},setSize:function(){var a=this;a.callParent(arguments);if(Ext.isIE&&a.el){a.el.repaint()}}});Ext.define("Ext.resizer.BorderSplitter",{extend:"Ext.resizer.Splitter",uses:["Ext.resizer.BorderSplitterTracker"],alias:"widget.bordersplitter",collapseTarget:null,getTrackerConfig:function(){var a=this.callParent();a.xclass="Ext.resizer.BorderSplitterTracker";return a}});Ext.define("Ext.layout.container.Border",{alias:["layout.border"],extend:"Ext.layout.container.Container",requires:["Ext.resizer.BorderSplitter","Ext.Component","Ext.fx.Anim"],alternateClassName:"Ext.layout.BorderLayout",targetCls:Ext.baseCSSPrefix+"border-layout-ct",itemCls:Ext.baseCSSPrefix+"border-item "+Ext.baseCSSPrefix+"box-item",padding:undefined,percentageRe:/(\d+)%/,axisProps:{horz:{borderBegin:"west",borderEnd:"east",horizontal:true,posProp:"x",sizeProp:"width",sizePropCap:"Width"},vert:{borderBegin:"north",borderEnd:"south",horizontal:false,posProp:"y",sizeProp:"height",sizePropCap:"Height"}},centerRegion:null,collapseDirections:{north:"top",south:"bottom",east:"right",west:"left"},manageMargins:true,panelCollapseAnimate:true,panelCollapseMode:"placeholder",regionWeights:{north:20,south:10,center:0,west:-10,east:-20},beginAxis:function(n,c,z){var x=this,d=x.axisProps[z],u=!d.horizontal,m=d.sizeProp,k=0,r=0,y=0,q=0,a=0,b=n.childItems,h=b.length,w,t,p,j,v,s,g,l,o,e;for(t=0;t<h;++t){p=b[t];v=p.target;p.layoutPos={};if(v.region){p.region=g=v.region;p.isCenter=v.isCenter;p.isHorz=v.isHorz;p.isVert=v.isVert;if(v.isCenter){w=p}if(u!==p.isVert){continue}if(p.isCenter){n.centerRegion=p}else{p.reverseWeighting=(g==d.borderEnd)}c[v.id]=p;p.weight=v.weight||x.regionWeights[g]||0;++k;o=v[m];e=typeof o;if(v.collapsed||v.placeholderFor){if(!p.isCenter){++a}}else{if(e=="string"&&(l=x.percentageRe.exec(o))){p.flex=s=parseInt(l[1],10)/100;p.percentageSize=true;if(p.isCenter){j=s}r+=s;++y}else{if(e!="number"&&v.flex&&(u?p.isVert:!p.isVert)){p.flex=s=v.flex;if(p.isCenter){j=s}r+=s;++q}else{if(!p.isCenter){++a}}}}}}if(!j){if(y||r<1){j=1-r;r=1}else{if(q){j=r/q;r+=j}else{j=r=1}}}if(w&&w.target.collapsed&&u==w.collapsedVert){r-=j}return Ext.apply({before:u?"top":"left",count:k,centerFlex:j,nonFlexedCount:a,totalFlex:r},d)},beginLayout:function(c){var j=this,h=j.getLayoutItems(),d=j.padding,k=typeof d,m=false,n,l,b,g,e,a;if(d){if(k=="string"||k=="number"){d=Ext.util.Format.parseBox(d)}}else{d=c.getEl("getTargetEl").getPaddingInfo();m=true}c.outerPad=d;c.padOnContainer=m;for(g=0,b=h.length;g<b;++g){l=h[g];a=j.getSplitterTarget(l);if(a&&l.hidden!==a.hidden){if(l.hidden){l.show()}else{l.hide()}}}j.callParent(arguments);h=c.childItems;b=h.length;e={};c.borderAxisHorz=j.beginAxis(c,e,"horz");c.borderAxisVert=j.beginAxis(c,e,"vert");for(g=0;g<b;++g){n=h[g];a=j.getSplitterTarget(n.target);if(a){n.collapseTarget=a=e[a.id];n.weight=a.weight;n.reverseWeighting=a.reverseWeighting;a.splitter=n;n.isHorz=a.isHorz;n.isVert=a.isVert}}j.sortWeightedItems(h,"reverseWeighting");j.setupSplitterNeighbors(h)},calculate:function(d){var l=this,a=l.getContainerSize(d),h=d.childItems,c=h.length,b=d.borderAxisHorz,j=d.borderAxisVert,e=d.outerPad,m=d.padOnContainer,g,n,k;b.begin=e.left;j.begin=e.top;b.end=b.flexSpace=a.width+(m?e.left:-e.right);j.end=j.flexSpace=a.height+(m?e.top:-e.bottom);for(g=0;g<c;++g){n=h[g];k=n.getMarginInfo();b.addUnflexed(k.width);j.addUnflexed(k.height);if(!n.flex){if(n.isHorz){b.addUnflexed(n.getProp("width"))}else{if(n.isVert){j.addUnflexed(n.getProp("height"))}}}}for(g=0;g<c;++g){n=h[g];if(!n.isCenter){l.calculateChildAxis(n,b);l.calculateChildAxis(n,j)}}if(l.finishAxis(d,j)+l.finishAxis(d,b)<2){l.done=false}else{l.finishPositions(h)}},calculateChildAxis:function(l,c){var a=l.collapseTarget,g="set"+c.sizePropCap,d=l.getMarginInfo()[c.sizeProp],h=l.getMarginInfo()[c.before],j,b,e,i,k;if(a){j=a.region}else{j=l.region;e=l.flex}b=j==c.borderBegin;if(!b&&j!=c.borderEnd){l[g](c.end-c.begin-d);i=c.begin}else{if(e){k=Math.ceil(c.flexSpace*(e/c.totalFlex));k=l[g](k-d)}else{k=l.getProp(c.sizeProp)}k+=d;if(b){i=c.begin;c.begin+=k}else{c.end=i=c.end-k}}l.layoutPos[c.posProp]=i},finishAxis:function(d,c){var b=c.end-c.begin,a=d.centerRegion;if(a){a["set"+c.sizePropCap](b-a.getMarginInfo()[c.sizeProp]);a.layoutPos[c.posProp]=c.begin}return Ext.isNumber(b)?1:0},finishPositions:function(d){var c=d.length,b,a;for(b=0;b<c;++b){a=d[b];a.setProp("x",a.layoutPos.x+a.marginInfo.left);a.setProp("y",a.layoutPos.y+a.marginInfo.top)}},getPlaceholder:function(a){return a.createPlaceholder()},getSplitterTarget:function(b){var a=b.collapseTarget;if(a&&a.collapsed){return a.placeholder||a}return a},insertSplitter:function(c,b){var e=c.region,d={xtype:"bordersplitter",collapseTarget:c,id:c.id+"-splitter",hidden:!!c.hidden},a=b+((e=="south"||e=="east")?0:1);if(c.isHorz){d.height=null}else{d.width=null}if(c.collapseMode=="mini"){d.collapsedCls=c.collapsedCls}c.splitter=this.owner.add(a,d)},onAdd:function(c,a){var b=this,e=c.placeholderFor,d=c.region;b.callParent(arguments);if(d){Ext.apply(c,b.regionFlags[d]);if(d=="center"){b.centerRegion=c}else{c.collapseDirection=this.collapseDirections[d];if(c.split&&(c.isHorz||c.isVert)){b.insertSplitter(c,a)}}if(!c.hasOwnProperty("collapseMode")){c.collapseMode=b.panelCollapseMode}if(!c.hasOwnProperty("animCollapse")){if(c.collapseMode!="placeholder"){c.animCollapse=false}else{c.animCollapse=b.panelCollapseAnimate}}}else{if(e){Ext.apply(c,b.regionFlags[e.region]);c.region=e.region;c.weight=e.weight}}},onDestroy:function(){this.centerRegion=null;this.callParent()},onRemove:function(b){var a=this,d=b.region,c=b.splitter;if(d){if(b.isCenter){a.centerRegion=null}delete b.isCenter;delete b.isHorz;delete b.isVert;if(c){a.owner.doRemove(c,true);delete b.splitter}}this.callParent(arguments)},regionFlags:{center:{isCenter:true,isHorz:false,isVert:false},north:{isCenter:false,isHorz:false,isVert:true},south:{isCenter:false,isHorz:false,isVert:true},west:{isCenter:false,isHorz:true,isVert:false},east:{isCenter:false,isHorz:true,isVert:false}},setupSplitterNeighbors:function(m){var p={},e=m.length,o=this.touchedRegions,h,g,a,l,d,k,n,b,c;for(h=0;h<e;++h){k=m[h].target;n=k.region;if(k.isCenter){a=k}else{if(n){c=o[n];for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(k)}}if(k.placeholderFor){b=k.placeholderFor.splitter}else{b=k.splitter}if(b){b.neighbors=[]}p[n]=b}}}if(a){c=o.center;for(g=0,l=c.length;g<l;++g){d=p[c[g]];if(d){d.neighbors.push(a)}}}},touchedRegions:{center:["north","south","east","west"],north:["north","east","west"],south:["south","east","west"],east:["east","north","south"],west:["west","north","south"]},sizePolicies:{vert:{setsWidth:1,setsHeight:0},horz:{setsWidth:0,setsHeight:1},flexAll:{setsWidth:1,setsHeight:1}},getItemSizePolicy:function(e){var d=this,a=this.sizePolicies,c,b,g,h;if(e.isCenter){h=e.placeholderFor;if(h){if(h.collapsedVertical()){return a.vert}return a.horz}if(e.collapsed){if(e.collapsedVertical()){return a.vert}return a.horz}return a.flexAll}c=e.collapseTarget;if(c){return c.isVert?a.vert:a.horz}if(e.region){if(e.isVert){b=e.height;g=a.vert}else{b=e.width;g=a.horz}if(e.flex||(typeof b=="string"&&d.percentageRe.test(b))){return a.flexAll}return g}return d.autoSizePolicy}},function(){var a={addUnflexed:function(c){this.flexSpace=Math.max(this.flexSpace-c,0)}};var b=this.prototype.axisProps;Ext.apply(b.horz,a);Ext.apply(b.vert,a)});Ext.define("Ext.selection.CellModel",{extend:"Ext.selection.Model",alias:"selection.cellmodel",requires:["Ext.util.KeyNav"],enableKeyNav:true,preventWrap:false,constructor:function(){this.addEvents("deselect","select");this.callParent(arguments)},bindComponent:function(a){var b=this;b.primaryView=a;b.views=b.views||[];b.views.push(a);b.bindStore(a.getStore(),true);a.on({cellmousedown:b.onMouseDown,refresh:b.onViewRefresh,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,tab:b.onKeyTab,scope:b})},getHeaderCt:function(){return this.primaryView.headerCt},onKeyUp:function(b,a){this.move("up",b)},onKeyDown:function(b,a){this.move("down",b)},onKeyLeft:function(b,a){this.move("left",b)},onKeyRight:function(b,a){this.move("right",b)},move:function(a,c){var b=this,d=b.primaryView.walkCells(b.getCurrentPosition(),a,c,b.preventWrap);if(d){b.setCurrentPosition(d)}return d},getCurrentPosition:function(){return this.position},setCurrentPosition:function(b){var a=this;if(a.position){a.onCellDeselect(a.position)}a.position=b;if(b){a.onCellSelect(b)}},onMouseDown:function(c,a,d,b,h,i,g){this.setCurrentPosition({row:i,column:d})},onCellSelect:function(a){this.doSelect(this.view.getStore().getAt(a.row))},onCellDeselect:function(a){this.doDeselect(this.view.getStore().getAt(a.row))},onSelectChange:function(c,b,j,a){var e=this,i=e.store,h=e.position,d=b?"select":"deselect",g=e.primaryView;if((j||e.fireEvent("before"+d,e,c,h.row,h.column))!==false&&a()!==false){if(b){g.onCellSelect(h);g.onCellFocus(h)}else{g.onCellDeselect(h);delete e.position}if(!j){e.fireEvent(d,e,c,h.row,h.column)}}},onKeyTab:function(h,c){var d=this,g=h.shiftKey?"left":"right",b=d.view.editingPlugin,a=d.move(g,h);if(b&&a&&d.wasEditing){b.startEditByPosition(a)}delete d.wasEditing},onEditorTab:function(b,g){var c=this,d=g.shiftKey?"left":"right",a=c.move(d,g);if(a){b.startEditByPosition(a);c.wasEditing=true}},refresh:function(){var a=this.getCurrentPosition();if(a){this.onCellSelect(a)}},onViewRefresh:function(){var a=this.getCurrentPosition();if(a){this.onCellDeselect(a);this.setCurrentPosition(null)}},selectByPosition:function(a){this.setCurrentPosition(a)}});Ext.define("Ext.selection.RowModel",{extend:"Ext.selection.Model",alias:"selection.rowmodel",requires:["Ext.util.KeyNav"],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:true,constructor:function(){this.addEvents("beforedeselect","beforeselect","deselect","select");this.views=[];this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bindStore(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on("render",Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav({target:a,eventName:"itemkeydown",processEvent:function(d,c,h,e,g){g.recordIndex=e;return g},up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,scope:b});a.el.on(Ext.EventManager.getKeyEvent(),b.onKeyPress,b)},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(c){var b=this,a=b.store.getAt(b.store.getCount()-1);if(a){if(c.shiftKey){b.selectRange(a,b.lastFocused||0);b.setLastFocused(a)}else{if(c.ctrlKey){b.setLastFocused(a)}else{b.doSelect(a)}}}},onKeyHome:function(b){var a=this,c=a.store.getAt(0);if(c){if(b.shiftKey){a.selectRange(c,a.lastFocused||0);a.setLastFocused(c)}else{if(b.ctrlKey){a.setLastFocused(c)}else{a.doSelect(c,false)}}}},onKeyPageUp:function(h){var g=this,i=g.getRowsVisible(),b,c,a,d;if(i){b=h.recordIndex;c=b-i;if(c<0){c=0}a=g.store.getAt(c);if(h.shiftKey){d=g.store.getAt(b);g.selectRange(a,d,h.ctrlKey,"up");g.setLastFocused(a)}else{if(h.ctrlKey){h.preventDefault();g.setLastFocused(a)}else{g.doSelect(a)}}}},onKeyPageDown:function(h){var d=this,i=d.getRowsVisible(),a,g,c,b;if(i){a=h.recordIndex;g=a+i;if(g>=d.store.getCount()){g=d.store.getCount()-1}c=d.store.getAt(g);if(h.shiftKey){b=d.store.getAt(a);d.selectRange(c,b,h.ctrlKey,"down");d.setLastFocused(c)}else{if(h.ctrlKey){h.preventDefault();d.setLastFocused(c)}else{d.doSelect(c)}}}},onKeyPress:function(c){if(c.getKey()===c.SPACE){c.stopEvent();var b=this,a=b.lastFocused;if(a){if(b.isSelected(a)){b.doDeselect(a,false)}else{b.doSelect(a,true)}}}},onKeyUp:function(g){var d=this,c=d.views[0],a=d.store.indexOf(d.lastFocused),b;if(a>0){b=d.store.getAt(a-1);if(g.shiftKey&&d.lastFocused){if(d.isSelected(d.lastFocused)&&d.isSelected(b)){d.doDeselect(d.lastFocused,true);d.setLastFocused(b)}else{if(!d.isSelected(d.lastFocused)){d.doSelect(d.lastFocused,true);d.doSelect(b,true)}else{d.doSelect(b,true)}}}else{if(g.ctrlKey){d.setLastFocused(b)}else{d.doSelect(b)}}}},onKeyDown:function(g){var d=this,c=d.views[0],a=d.store.indexOf(d.lastFocused),b;if(a+1<d.store.getCount()){b=d.store.getAt(a+1);if(d.selected.getCount()===0){d.doSelect(b)}else{if(g.shiftKey&&d.lastFocused){if(d.isSelected(d.lastFocused)&&d.isSelected(b)){d.doDeselect(d.lastFocused,true);d.setLastFocused(b)}else{if(!d.isSelected(d.lastFocused)){d.doSelect(d.lastFocused,true);d.doSelect(b,true)}else{d.doSelect(b,true)}}}else{if(g.ctrlKey){d.setLastFocused(b)}else{d.doSelect(b)}}}}},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,d,c,g){b.focus(false,Ext.isIE?200:false);if(!this.allowRightMouseSelection(g)){return}this.selectWithEvent(a,g)},allowRightMouseSelection:function(a){var b=this.ignoreRightMouseSelection&&a.button!==0;if(b){b=this.hasSelection()}return !b},onSelectChange:function(g,c,l,a){var j=this,m=j.views,d=m.length,k=j.store,b=k.indexOf(g),h=c?"select":"deselect",e=0;if((l||j.fireEvent("before"+h,j,g,b))!==false&&a()!==false){for(;e<d;e++){if(c){m[e].onRowSelect(b,l)}else{m[e].onRowDeselect(b,l)}}if(!l){j.fireEvent(h,j,g,b)}}},onLastFocusChanged:function(j,d,b){var a=this.views,h=a.length,c=this.store,g,e=0;if(j){g=c.indexOf(j);if(g!=-1){for(;e<h;e++){a[e].onRowFocus(g,false)}}}if(d){g=c.indexOf(d);if(g!=-1){for(e=0;e<h;e++){a[e].onRowFocus(g,true,b)}}}this.callParent()},onEditorTab:function(d,i){var g=this,c=g.views[0],b=d.getActiveRecord(),j=d.getActiveColumn(),a=c.getPosition(b,j),h=i.shiftKey?"left":"right";do{a=c.walkCells(a,h,i,g.preventWrap)}while(a&&!c.headerCt.getHeaderAtIndex(a.column).getEditor());if(a){d.startEditByPosition(a)}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)},selectNext:function(h,c){var g=this,b=g.store,e=g.getSelection(),a=e[e.length-1],d=b.indexOf(a)+1,i;if(d===b.getCount()||d===0){i=false}else{g.doSelect(d,h,c);i=true}return i},selectPrevious:function(g,b){var e=this,d=e.getSelection(),a=d[0],c=e.store.indexOf(a)-1,h;if(c<0){h=false}else{e.doSelect(c,g,b);h=true}return h}});Ext.define("Ext.selection.CheckboxModel",{alias:"selection.checkboxmodel",extend:"Ext.selection.RowModel",mode:"MULTI",injectCheckbox:0,checkOnly:false,showHeaderCheckbox:true,headerWidth:24,checkerOnCls:Ext.baseCSSPrefix+"grid-hd-checker-on",bindComponent:function(a){var b=this;b.sortable=false;b.callParent(arguments);if(!b.hasLockedHeader()||a.headerCt.lockedCt){a.headerCt.on("headerclick",b.onHeaderClick,b);b.addCheckbox(true);b.mon(a.ownerCt,"reconfigure",b.onReconfigure,b)}},hasLockedHeader:function(){var a=false;Ext.each(this.views,function(b){if(b.headerCt.lockedCt){a=true;return false}});return a},addCheckbox:function(b){var c=this,d=c.injectCheckbox,a=c.views[0],e=a.headerCt;if(d!==false){if(d=="first"){d=0}else{if(d=="last"){d=e.getColumnCount()}}e.add(d,c.getHeaderConfig())}if(b!==true){a.refresh()}},onReconfigure:function(c,a,b){if(b){this.addCheckbox()}},toggleUiHeader:function(d){var a=this.views[0],c=a.headerCt,b=c.child("gridcolumn[isCheckerHd]");if(b){if(d){b.el.addCls(this.checkerOnCls)}else{b.el.removeCls(this.checkerOnCls)}}},onHeaderClick:function(c,g,b){if(g.isCheckerHd){b.stopEvent();var a=this,d=g.el.hasCls(Ext.baseCSSPrefix+"grid-hd-checker-on");a.preventFocus=true;if(d){a.deselectAll()}else{a.selectAll()}delete a.preventFocus}},getHeaderConfig:function(){var a=this,b=a.showHeaderCheckbox!==false;return{isCheckerHd:b,text:"&#160;",width:a.headerWidth,sortable:false,draggable:false,resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:b?Ext.baseCSSPrefix+"column-header-checkbox ":"",renderer:Ext.Function.bind(a.renderer,a),editRenderer:a.editRenderer||a.renderEmpty,locked:a.hasLockedHeader()}},renderEmpty:function(){return"&#160;"},renderer:function(h,c,b,i,e,d,a){var g=Ext.baseCSSPrefix;c.tdCls=g+"grid-cell-special "+g+"grid-cell-row-checker";return'<div class="'+g+'grid-row-checker">&#160;</div>'},onRowMouseDown:function(b,a,h,d,i){b.el.focus();var g=this,c=i.getTarget("."+Ext.baseCSSPrefix+"grid-row-checker");if(!g.allowRightMouseSelection(i)){return}if(g.checkOnly&&!c){return}if(c){var j=g.getSelectionMode();if(j!=="SINGLE"){g.setSelectionMode("SIMPLE")}g.selectWithEvent(a,i);g.setSelectionMode(j)}else{g.selectWithEvent(a,i)}},onSelectChange:function(){this.callParent(arguments);var a=this.selected.getCount()===this.store.getCount();this.toggleUiHeader(a)}});Ext.define("Ext.selection.TreeModel",{extend:"Ext.selection.RowModel",alias:"selection.treemodel",pruneRemoved:false,onKeyRight:function(d,b){var c=this.getLastFocused(),a=this.view;if(c){if(c.isExpanded()){this.onKeyDown(d,b)}else{if(!c.isLeaf()){a.expand(c)}}}},onKeyLeft:function(i,d){var h=this.getLastFocused(),c=this.view,b=c.getSelectionModel(),a,g;if(h){a=h.parentNode;if(h.isExpanded()){c.collapse(h)}else{if(a&&!a.isRoot()){if(i.shiftKey){b.selectRange(a,h,i.ctrlKey,"up");b.setLastFocused(a)}else{if(i.ctrlKey){b.setLastFocused(a)}else{b.select(a)}}}}}},onKeyPress:function(g,b){var a=g.getKey(),c,d;if(a===g.SPACE||a===g.ENTER){g.stopEvent();c=this.getLastSelected();if(c){this.view.onCheckChange(c)}}else{this.callParent(arguments)}}});Ext.define("Ext.tab.Tab",{extend:"Ext.button.Button",alias:"widget.tab",requires:["Ext.layout.component.Tab","Ext.util.KeyNav"],componentLayout:"tab",isTab:true,baseCls:Ext.baseCSSPrefix+"tab",activeCls:"active",closableCls:"closable",closable:true,closeText:"Close Tab",active:false,childEls:["closeEl"],scale:false,position:"top",initComponent:function(){var a=this;a.addEvents("activate","deactivate","beforeclose","close");a.callParent(arguments);if(a.card){a.setCard(a.card)}},getTemplateArgs:function(){var b=this,a=b.callParent(arguments);if(b.closable){Ext.apply(a,{closable:true,closeText:b.closeText})}return a},beforeRender:function(){var b=this,a=b.up("tabbar"),c=b.up("tabpanel");b.callParent();b.addClsWithUI(b.position);b.syncClosableUI();if(!b.minWidth){b.minWidth=(a)?a.minTabWidth:b.minWidth;if(!b.minWidth&&c){b.minWidth=c.minTabWidth}if(b.minWidth&&b.iconCls){b.minWidth+=25}}if(!b.maxWidth){b.maxWidth=(a)?a.maxTabWidth:b.maxWidth;if(!b.maxWidth&&c){b.maxWidth=c.maxTabWidth}}},onRender:function(){var a=this;a.callParent(arguments);if(a.active){a.activate(true)}if(a.closeEl){a.closeEl.on("click",Ext.EventManager.preventDefault)}a.keyNav=new Ext.util.KeyNav(a.el,{enter:a.onEnterKey,del:a.onDeleteKey,scope:a})},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI(b.position+"-disabled");return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI(b.position+"-disabled");return b},onDestroy:function(){var a=this;if(a.closeEl){a.closeEl.un("click",Ext.EventManager.preventDefault);a.closeEl=null}Ext.destroy(a.keyNav);delete a.keyNav;a.callParent(arguments)},setClosable:function(a){var b=this;a=(!arguments.length||!!a);if(b.closable!=a){b.closable=a;if(b.card){b.card.closable=a}b.syncClosableUI();if(b.rendered){b.syncClosableElements();b.doComponentLayout();if(b.ownerCt){b.ownerCt.doLayout()}}}},syncClosableElements:function(){var a=this,b=a.closeEl;if(a.closable){if(!b){a.closeEl=a.el.createChild({tag:"a",cls:a.baseCls+"-close-btn",href:"#",title:a.closeText}).on("click",Ext.EventManager.preventDefault)}}else{if(b){b.un("click",Ext.EventManager.preventDefault);b.remove();delete a.closeEl}}},syncClosableUI:function(){var b=this,a=[b.closableCls,b.closableCls+"-"+b.position];if(b.closable){b.addClsWithUI(a)}else{b.removeClsWithUI(a)}},setCard:function(a){var b=this;b.card=a;b.setText(b.title||a.title);b.setIconCls(b.iconCls||a.iconCls);b.setIcon(b.icon||a.icon)},onCloseClick:function(){var a=this;if(a.fireEvent("beforeclose",a)!==false){if(a.tabBar){if(a.tabBar.closeTab(a)===false){return}}else{a.fireEvent("close",a)}}},fireClose:function(){this.fireEvent("close",this)},onEnterKey:function(b){var a=this;if(a.tabBar){a.tabBar.onClick(b,a.el)}},onDeleteKey:function(b){var a=this;if(a.closable){a.onCloseClick()}},activate:function(b){var a=this;a.active=true;a.addClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("activate",a)}},deactivate:function(b){var a=this;a.active=false;a.removeClsWithUI([a.activeCls,a.position+"-"+a.activeCls]);if(b!==true){a.fireEvent("deactivate",a)}}});Ext.define("Ext.tab.Bar",{extend:"Ext.panel.Header",alias:"widget.tabbar",baseCls:Ext.baseCSSPrefix+"tab-bar",requires:["Ext.tab.Tab"],isTabBar:true,defaultType:"tab",plain:false,childEls:["body","strip"],renderTpl:['<div id="{id}-body" class="{baseCls}-body <tpl if="bodyCls"> {bodyCls}</tpl> <tpl if="ui"> {baseCls}-body-{ui}<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl></tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values)%}","</div>",'<div id="{id}-strip" class="{baseCls}-strip<tpl if="ui"> {baseCls}-strip-{ui}<tpl for="uiCls"> {parent.baseCls}-strip-{parent.ui}-{.}</tpl></tpl>"></div>'],initComponent:function(){var b=this,a;if(b.plain){b.setUI(b.ui+"-plain")}b.addClsWithUI(b.dock);b.addEvents("change");b.callParent(arguments);b.on({click:b.onClick,element:"el",delegate:"."+Ext.baseCSSPrefix+"tab",scope:b});b.layout.align=(b.orientation=="vertical")?"left":"top";b.layout.overflowHandler=new Ext.layout.container.boxOverflow.Scroller(b.layout);b.remove(b.titleCmp);delete b.titleCmp;Ext.apply(b.renderData,{bodyCls:b.bodyCls})},getLayout:function(){var a=this;a.layout.type=(a.dock==="top"||a.dock==="bottom")?"hbox":"vbox";return a.callParent(arguments)},onAdd:function(a){a.position=this.dock;this.callParent(arguments)},onRemove:function(a){var b=this;if(a===b.previousTab){b.previousTab=null}if(a===b.activeTab){b.activeTab=null}if(b.items.getCount()===0){b.activeTab=null}b.callParent(arguments)},afterComponentLayout:function(b){var c=this,a=c.activeTab;c.callParent(arguments);c.strip.setWidth(b);if(a&&c.rendered){c.layout.overflowHandler.scrollToItem(a)}},onClick:function(c,b){var a=Ext.getCmp(b.id),d=this.tabPanel;b=c.getTarget();if(a&&a.isDisabled&&!a.isDisabled()){if(a.closable&&b===a.closeEl.dom){a.onCloseClick()}else{if(d){d.setActiveTab(a.card)}else{this.setActiveTab(a)}a.focus()}}},closeTab:function(c){var d=this,b=c.card,e=d.tabPanel,a;if(b&&b.fireEvent("beforeclose",b)===false){return false}if(c.active&&d.items.getCount()>1){a=d.previousTab||c.next("tab")||d.items.first();d.setActiveTab(a);if(e){e.setActiveTab(a.card)}}c.fireClose();d.remove(c);if(e&&b){b.fireEvent("close",b);e.remove(b)}if(a){a.focus()}},setActiveTab:function(a){if(a.disabled){return}var b=this;if(b.activeTab){b.previousTab=b.activeTab;b.activeTab.deactivate()}a.activate();b.activeTab=a;b.fireEvent("change",b,a,a.card)}});Ext.define("Ext.toolbar.Fill",{extend:"Ext.Component",alias:"widget.tbfill",alternateClassName:"Ext.Toolbar.Fill",isFill:true,flex:1});Ext.define("Ext.toolbar.Item",{extend:"Ext.Component",alias:"widget.tbitem",alternateClassName:"Ext.Toolbar.Item",enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define("Ext.toolbar.Separator",{extend:"Ext.toolbar.Item",alias:"widget.tbseparator",alternateClassName:"Ext.Toolbar.Separator",baseCls:Ext.baseCSSPrefix+"toolbar-separator",focusable:false});Ext.define("Ext.layout.container.boxOverflow.Menu",{extend:"Ext.layout.container.boxOverflow.None",requires:["Ext.toolbar.Separator","Ext.button.Button"],alternateClassName:"Ext.layout.boxOverflow.Menu",noItemsMenuText:'<div class="'+Ext.baseCSSPrefix+'toolbar-no-items">(None)</div>',constructor:function(b){var a=this;a.callParent(arguments);a.triggerButtonCls=a.triggerButtonCls||Ext.baseCSSPrefix+"box-menu-"+b.getNames().right;a.menuItems=[]},beginLayout:function(a){this.callParent(arguments);this.clearOverflow(a)},beginLayoutCycle:function(b,a){this.callParent(arguments);if(!a){this.clearOverflow(b);this.layout.cacheChildItems(b)}},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},getSuffixConfig:function(){var c=this,b=c.layout,a=b.owner.id;c.menu=new Ext.menu.Menu({listeners:{scope:c,beforeshow:c.beforeMenuShow}});c.menuTrigger=new Ext.button.Button({id:a+"-menu-trigger",cls:Ext.layout.container.Box.prototype.innerCls+" "+c.triggerButtonCls,hidden:true,ownerCt:b.owner,ownerLayout:b,iconCls:Ext.baseCSSPrefix+b.owner.getXType()+"-more-icon",ui:b.owner instanceof Ext.toolbar.Toolbar?"default-toolbar":"default",menu:c.menu,getSplitCls:function(){return""}});return c.menuTrigger.getRenderTree()},getOverflowCls:function(){return Ext.baseCSSPrefix+this.layout.direction+"-box-overflow-body"},handleOverflow:function(e){var d=this,c=d.layout,h=c.getNames(),a="get"+h.widthCap,g=e.state.boxPlan,b=[null,null];d.showTrigger(e);b[h.heightIndex]=(g.maxSize-d.menuTrigger["get"+h.heightCap]())/2;d.menuTrigger.setPosition.apply(d.menuTrigger,b);return{reservedSpace:d.menuTrigger[a]()}},captureChildElements:function(){var a=this.menuTrigger;if(a.rendering){a.finishRender()}},clearOverflow:function(h){var g=this,b=g.menuItems,e,c=0,d=b.length,a=g.layout.owner;a.suspendLayouts();g.captureChildElements();g.hideTrigger();a.resumeLayouts();for(;c<d;c++){e=b[c];e.suspendLayouts();e.show();e.resumeLayouts({isRoot:true})}b.length=0},showTrigger:function(c){var o=this,k=o.layout,a=k.owner,n=k.getNames(),r=n.x,e=n.width,p=c.state.boxPlan,b=p.targetSize[e],h=c.childItems,l=h.length,g=o.menuTrigger,q,j,d,m;g.suspendLayouts();g.show();g.resumeLayouts({isRoot:true});b-=o.menuTrigger.getWidth();a.suspendLayouts();o.menuItems.length=0;for(d=0;d<l;d++){q=h[d];m=q.props;if(m[r]+m[e]>b){j=q.target;o.menuItems.push(j);j.hide()}}a.resumeLayouts()},hideTrigger:function(){var a=this.menuTrigger;if(a){a.hide()}},beforeMenuShow:function(j){var h=this,b=h.menuItems,d=0,a=b.length,g,e;var c=function(k,i){return k.isXType("buttongroup")&&!(i instanceof Ext.toolbar.Separator)};j.suspendLayouts();h.clearMenu();j.removeAll();for(;d<a;d++){g=b[d];if(!d&&(g instanceof Ext.toolbar.Separator)){continue}if(e&&(c(g,e)||c(e,g))){j.add("-")}h.addComponentToMenu(j,g);e=g}if(j.items.length<1){j.add(h.noItemsMenuText)}j.resumeLayouts()},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(c,a){var b=this;if(a instanceof Ext.toolbar.Separator){c.add("-")}else{if(a.isComponent){if(a.isXType("splitbutton")){c.add(b.createMenuConfig(a,true))}else{if(a.isXType("button")){c.add(b.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(d){b.addComponentToMenu(c,d)})}else{c.add(Ext.create(Ext.getClassName(a),b.createMenuConfig(a)))}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){if(b.menu){delete b.menu}})}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define("Ext.layout.container.Box",{alias:["layout.box"],extend:"Ext.layout.container.Container",alternateClassName:"Ext.layout.BoxLayout",requires:["Ext.layout.container.boxOverflow.None","Ext.layout.container.boxOverflow.Menu","Ext.layout.container.boxOverflow.Scroller","Ext.util.Format","Ext.dd.DragDropManager"],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:0,pack:"start",flex:undefined,stretchMaxPartner:undefined,type:"box",scrollOffset:0,itemCls:Ext.baseCSSPrefix+"box-item",targetCls:Ext.baseCSSPrefix+"box-layout-ct",innerCls:Ext.baseCSSPrefix+"box-inner",availableSpaceOffset:0,reserveOffset:true,manageMargins:true,childEls:["innerCt"],renderTpl:["{%this.renderOverflowPrefix(out, values)%}",'<div id="{ownerId}-innerCt" class="{[values.$layout.innerCls]} {[values.$layout.overflowHandler.getOverflowCls()]}" role="presentation">',"{%this.renderBody(out, values)%}","</div>","{%this.renderOverflowSuffix(out, values)%}",{renderOverflowPrefix:function(b,a){var c=a.$comp.layout.overflowHandler.getPrefixConfig();if(c){Ext.DomHelper.generateMarkup(c,b)}},renderOverflowSuffix:function(c,b){var a=b.$comp.layout.overflowHandler.getSuffixConfig();if(a){Ext.DomHelper.generateMarkup(a,c)}},disableFormats:true}],constructor:function(a){var c=this,b;c.callParent(arguments);c.flexSortFn=Ext.Function.bind(c.flexSort,c);c.initOverflowHandler();b=typeof c.padding;if(b=="string"||b=="number"){c.padding=Ext.util.Format.parseBox(c.padding);c.padding.height=c.padding.top+c.padding.bottom;c.padding.width=c.padding.left+c.padding.right}},getNames:function(){return this.names},getItemSizePolicy:function(b){var c=this.sizePolicy,d=this.align,a=(d=="stretchmax"||d=="stretch")?d:"";if(b.flex){c=c.flex}return c[a]},flexSort:function(d,c){var e="max"+this.getNames().widthCap,g=Infinity;d=d.target[e]||g;c=c.target[e]||g;if(!isFinite(d)&&!isFinite(c)){return 0}return d-c},isItemBoxParent:function(a){return true},isItemShrinkWrap:function(a){return true},minSizeSortFn:function(d,c){return c.available-d.available},roundFlex:function(a){return Math.ceil(a)},beginCollapse:function(b){var a=this;if(a.direction==="vertical"&&b.collapsedVertical()){b.collapseMemento.capture(["flex"]);delete b.flex}else{if(a.direction==="horizontal"&&b.collapsedHorizontal()){b.collapseMemento.capture(["flex"]);delete b.flex}}},beginExpand:function(a){a.collapseMemento.restore(["flex"])},beginLayout:function(c){var b=this,d=b.owner.stretchMaxPartner,a=b.innerCt.dom.style;b.overflowHandler.beginLayout(c);if(typeof d==="string"){d=Ext.getCmp(d)||b.owner.query(d)[0]}c.stretchMaxPartner=d&&c.context.getCmp(d);b.callParent(arguments);c.innerCtContext=c.getEl("innerCt",b);a.width="";a.height="";b.cacheFlexes(c)},beginLayoutCycle:function(b,m){var j=this,e=j.align,h=j.getNames(),l=j.pack,k=h.height+"Model",d,n,c,a,g;j.overflowHandler.beginLayoutCycle(b,m);j.callParent(arguments);b.parallelSizeModel=b[h.width+"Model"];b.perpendicularSizeModel=b[k];b.boxOptions={align:e={stretch:e=="stretch",stretchmax:e=="stretchmax",center:e==h.center},pack:l={center:l=="center",end:l=="end"}};if(e.stretch&&b.perpendicularSizeModel.shrinkWrap){e.stretchmax=true;e.stretch=false}if(b.parallelSizeModel.shrinkWrap){l.center=l.end=false}if(e.stretchmax){d=b.childItems;a=d.length;g=j.sizeModels.shrinkWrap;for(c=0;c<a;++c){n=d[c];if(!n[k].configured){n[k]=g}}}},cacheFlexes:function(d){var k=this.getNames(),m=k.width+"Model",e=0,h=d.childItems,g=h.length,l=[],a=0,c="min"+k.widthCap,b,n,j;while(g--){n=h[g];if(n[m].calculated){b=n.target;n.flex=j=b.flex;if(j){e+=j;l.push(n);a+=b[c]||0}}}d.flexedItems=l;d.flexedMinSize=a;d.totalFlex=e;Ext.Array.sort(l,this.flexSortFn)},calculate:function(d){var b=this,a=b.getContainerSize(d),g=b.getNames(),c=d.state,e=c.boxPlan||(c.boxPlan={});if(!d.parallelSizeModel.shrinkWrap&&!a["got"+g.widthCap]){b.done=false;return}e.targetSize=a;e.scrollParallel=(b.owner.autoScroll||b.owner["overflow"+g.y.toUpperCase()]);if(!c.parallelDone){c.parallelDone=b.calculateParallel(d,g,e)}if(!c.perpendicularDone){c.perpendicularDone=b.calculatePerpendicular(d,g,e)}if(b.owner.dock&&(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&&!b.owner.width&&!b.horizontal){e.isIEVerticalDock=true;e.calculatedWidth=e.maxSize+d.getPaddingInfo().width+d.getBorderInfo().width}if(!c.parallelDone||!c.perpendicularDone){b.done=false}else{b.publishInnerCtSize(d,b.reserveOffset?b.availableSpaceOffset:0);if(b.done&&d.boxOptions.align.stretchmax&&!c.stretchMaxDone){b.calculateStretchMax(d,g,e);c.stretchMaxDone=true}}},calculateParallel:function(h,l,b){var A=this,w=l.width,g=l.widthCap,a=h.childItems,c=l.left,p=l.right,o="set"+g,x=a.length,u=h.flexedItems,q=u.length,t=h.boxOptions.pack,k=A.padding,d=k[c],z=d+k[p]+A.scrollOffset+(A.reserveOffset?A.availableSpaceOffset:0),s,j,e,v,m,r,y,n;for(s=0;s<x;++s){m=a[s];j=m.marginInfo||m.getMarginInfo();z+=j[w];if(!m.flex){z+=m.getProp(w);if(isNaN(z)){return false}}}if(h.parallelSizeModel.shrinkWrap){b.availableSpace=0;b.tooNarrow=false}else{b.availableSpace=b.targetSize[w]-z;b.tooNarrow=b.availableSpace<h.flexedMinSize}n=z;e=b.availableSpace;v=h.totalFlex;for(s=0;s<q;s++){m=u[s];r=m.flex;y=A.roundFlex((r/v)*e);y=m[o](y);n+=y;e=Math.max(0,e-y);v-=r}if(t.center){d+=e/2}else{if(t.end){d+=e}}h["setContent"+g](n+A.padding[w]+h.targetContext.getPaddingInfo()[w]);for(s=0;s<x;++s){m=a[s];j=m.marginInfo;d+=j[c];m.setProp(l.x,d);d+=j[p]+m.props[w]}return true},calculatePerpendicular:function(q,u,c){var E=this,a=q.perpendicularSizeModel.shrinkWrap,d=c.targetSize,b=q.childItems,C=b.length,H=Math.max,F=u.height,o=u.heightCap,l="set"+o,p=u.top,D=u.y,t=E.padding,v=t[p],g=d[F]-v-t[u.bottom],A=q.boxOptions.align,n=A.stretch,y=A.stretchmax,m=A.center,z=0,G,B,e,s,r,x,w,j,k,h;if(n||(m&&!a)){if(isNaN(g)){return false}}if(n&&c.scrollParallel&&c.tooNarrow){k=Ext.getScrollbarSize().height;g-=k;c.targetSize[F]-=k}if(n){x=g}else{for(B=0;B<C;B++){w=b[B];s=w.marginInfo||w.getMarginInfo();e=w.getProp(F);if(isNaN(z=H(z,e+s[F],w.target["min"+o]||0))){return false}}j=q.stretchMaxPartner;if(j){q.setProp("maxChildHeight",z);h=j.childItems;if(h&&h.length){z=H(z,j.getProp("maxChildHeight"));if(isNaN(z)){return false}}}c.maxSize=z;q["setContent"+o](z+E.padding[F]+q.targetContext.getPaddingInfo()[F]);if(y){x=z}else{if(m){x=a?z:H(g,z);x-=q.innerCtContext.getBorderInfo()[F]}}}for(B=0;B<C;B++){w=b[B];s=w.marginInfo||w.getMarginInfo();G=v+s[p];if(n){w[l](x-s[F])}else{if(m){r=x-w.props[F];if(r>0){G=v+Math.round(r/2)}}}w.setProp(D,G)}return true},calculateStretchMax:function(c,j,l){var k=this,p=k.sizeModels.calculated,m=j.height+"Model",g=j.height,n=j.width,e=c.childItems,a=e.length,o=l.maxSize,q=k.onInvalidateChild,r,h,d,b;for(d=0;d<a;++d){r=e[d];if(r[m].shrinkWrap){h=r.props;b=o-r.getMarginInfo()[g];if(b!=h[g]){r[m]=p;r.invalidate({callback:q,layout:k,childWidth:h[n],childHeight:b,childX:h.x,childY:h.y,names:j})}}}},completeLayout:function(a){this.overflowHandler.completeLayout(a)},onInvalidateChild:function(c,b){var d=c.names,a=d.heightCap;b.setProp("x",c.childX);b.setProp("y",c.childY);if(b[d.height+"Model"].calculated){b["set"+a](c.childHeight)}if(b.flex){b["set"+d.widthCap](c.childWidth)}},publishInnerCtSize:function(a,d){var i=this,h=i.getNames(),g=h.height,k=h.width,e=a.boxOptions.align,o=i.owner.dock,l=i.padding,j=a.state.boxPlan,c=j.targetSize,n=c[g],p=a.innerCtContext,b=(a.parallelSizeModel.shrinkWrap||(j.tooNarrow&&j.scrollParallel)?a.props["content"+h.widthCap]:c[k])-(d||0),m;if(e.stretch){m=n}else{m=j.maxSize+l[h.top]+l[h.bottom]+p.getBorderInfo()[g];if(!a.perpendicularSizeModel.shrinkWrap&&e.center){m=Math.max(n,m)}}p["set"+h.widthCap](b);p["set"+h.heightCap](m);if(isNaN(b+m)){i.done=false}if(j.calculatedWidth&&(o=="left"||o=="right")){a.setWidth(j.calculatedWidth,true,true)}},onRemove:function(a){var b=this;b.callParent(arguments);if(b.overflowHandler){b.overflowHandler.onRemove(a)}if(a.layoutMarginCap==b.id){delete a.layoutMarginCap}},initOverflowHandler:function(){var d=this,c=d.overflowHandler,b,a;if(typeof c=="string"){c={type:c}}b="None";if(c&&c.type!==undefined){b=c.type}a=Ext.layout.container.boxOverflow[b];if(a[d.type]){a=a[d.type]}d.overflowHandler=Ext.create("Ext.layout.container.boxOverflow."+b,d,c)},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&&this.innerCt&&b.parentNode===this.innerCt.dom)||false},getRenderTarget:function(){return this.innerCt},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define("Ext.layout.container.HBox",{alias:["layout.hbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.HBoxLayout",align:"top",type:"hbox",direction:"horizontal",horizontal:true,names:{lr:"lr",left:"left",leftCap:"Left",right:"right",position:"left",width:"width",widthCap:"Width",widthIndex:0,x:"x",center:"middle",top:"top",topPosition:"top",bottom:"bottom",height:"height",heightCap:"Height",heightIndex:1,y:"y"},sizePolicy:{flex:{"":{setsWidth:1,setsHeight:0},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:0,setsHeight:1},stretchmax:{readsHeight:1,setsWidth:0,setsHeight:1}}});Ext.define("Ext.grid.ColumnLayout",{extend:"Ext.layout.container.HBox",alias:"layout.gridcolumn",type:"gridcolumn",reserveOffset:false,shrinkToFit:false,firstHeaderCls:Ext.baseCSSPrefix+"column-header-first",lastHeaderCls:Ext.baseCSSPrefix+"column-header-last",clearInnerCtOnLayout:true,beginLayout:function(c){var h=this,b=h.owner,a=b.up("[scrollerOwner]"),j=a.view,d=0,g=h.getVisibleItems(),e=g.length,k;h.callParent(arguments);for(;d<e;d++){k=g[d];k.removeCls([h.firstHeaderCls,h.lastHeaderCls]);k.el.setStyle({height:"auto"});k.titleEl.setStyle({height:"auto",paddingTop:"0"})}if(e>0){g[0].addCls(h.firstHeaderCls);g[e-1].addCls(h.lastHeaderCls)}if(!h.owner.isHeader&&Ext.getScrollbarSize().width&&!a.collapsed&&j&&j.rendered&&(c.viewTable=j.el.child("table",true))){c.viewContext=c.context.getCmp(j)}},roundFlex:function(a){return Math.floor(a)},getContainerSize:function(e){var d=this,a=d.callParent(arguments),c=e.viewContext,b;if(c&&!c.heightModel.shrinkWrap){b=c.getProp("height");if(isNaN(b)){d.done=false}else{if(e.state.tableHeight>b){a.width-=Ext.getScrollbarSize().width;e.state.parallelDone=false;c.invalidate()}}}return a},calculate:function(c){var b=this,a=c.viewContext;if(a&&!c.state.tableHeight){c.state.tableHeight=c.viewTable.offsetHeight}b.callParent(arguments)},completeLayout:function(c){var j=this,b=j.owner,a=c.state,g=false,k=j.sizeModels.calculated,e,h,d,m,l;j.callParent(arguments);if(!a.flexesCalculated&&b.forceFit&&!b.isHeader){e=c.childItems;h=e.length;for(d=0;d<h;d++){m=e[d];l=m.target;if(l.width){l.flex=c.childItems[d].flex=l.width;delete l.width;m.widthModel=k;g=true}}if(g){j.cacheFlexes(c);c.invalidate({state:{flexesCalculated:true}})}}},finalizeLayout:function(){var e=this,d=0,c,a,b;c=e.getVisibleItems();a=c.length;b=e.getRenderTarget().getViewSize().height;for(;d<a;d++){c[d].setPadding(b)}},publishInnerCtSize:function(c){var b=this,d=c.state.boxPlan,a=d.targetSize;if(!b.owner.isHeader){a.width=c.getProp("contentWidth")+Ext.getScrollbarSize().width}return b.callParent(arguments)}});Ext.define("Ext.grid.column.Column",{extend:"Ext.grid.header.Container",alias:"widget.gridcolumn",requires:["Ext.util.KeyNav","Ext.grid.ColumnComponentLayout","Ext.grid.ColumnLayout"],alternateClassName:"Ext.grid.Column",baseCls:Ext.baseCSSPrefix+"column-header "+Ext.baseCSSPrefix+"unselectable",hoverCls:Ext.baseCSSPrefix+"column-header-over",handleWidth:5,sortState:null,possibleSortStates:["ASC","DESC"],childEls:["titleEl","triggerEl","textEl"],renderTpl:'<div id="{id}-titleEl" class="'+Ext.baseCSSPrefix+'column-header-inner"><span id="{id}-textEl" class="'+Ext.baseCSSPrefix+'column-header-text">{text}</span><tpl if="!menuDisabled"><div id="{id}-triggerEl" class="'+Ext.baseCSSPrefix+'column-header-trigger"></div></tpl></div>{%this.renderContainer(out,values)%}',dataIndex:null,text:"&#160;",emptyCellText:"&#160;",sortable:true,resizable:true,hideable:true,menuDisabled:false,renderer:false,editRenderer:false,align:"left",draggable:true,initDraggable:Ext.emptyFn,isHeader:true,componentLayout:"columncomponent",initResizable:Ext.emptyFn,initComponent:function(){var a=this;if(Ext.isDefined(a.header)){a.text=a.header;delete a.header}if(a.flex){a.minWidth=a.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}else{}if(!a.triStateSort){a.possibleSortStates.length=2}if(Ext.isDefined(a.columns)){a.isGroupHeader=true;a.items=a.columns;delete a.columns;delete a.flex;delete a.width;a.cls=(a.cls||"")+" "+Ext.baseCSSPrefix+"group-header";a.sortable=false;a.resizable=false;a.align="center"}else{a.isContainer=false}a.addCls(Ext.baseCSSPrefix+"column-header-align-"+a.align);a.callParent(arguments);a.on({element:"el",click:a.onElClick,dblclick:a.onElDblClick,scope:a});a.on({element:"titleEl",mouseenter:a.onTitleMouseOver,mouseleave:a.onTitleMouseOut,scope:a})},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+"group-sub-header");this.callParent(arguments)},initRenderData:function(){var a=this;return Ext.applyIf(a.callParent(arguments),{text:a.text,menuDisabled:a.menuDisabled})},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var b=this,a=[],c={id:b.headerId};b.savePropsToState(["hidden","sortable","locked","flex","width"],c);if(b.isGroupHeader){b.items.each(function(d){a.push(d.getColumnState())});if(a.length){c.columns=a}}else{if(b.isSubHeader&&b.ownerCt.hidden){delete b.hidden}}if("width" in c){delete c.flex}return c},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getOwnerHeaderCt:function(){return this.up(":not([isHeader])")},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},beforeRender:function(){var b=this,a=b.up("tablepanel");b.callParent();if(a&&(!b.sortable||a.sortableColumns===false)&&!b.groupable&&!b.lockable&&(a.enableColumnHide===false||!b.getOwnerHeaderCt().getHideableColumns().length)){b.menuDisabled=true}},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);if(b.overCls){a.addClsOnOver(b.overCls)}if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.keyNav=new Ext.util.KeyNav(a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},setWidth:function(b,a){var j=this,c=j.ownerCt,k,h,g,d=j.getWidth(),e=0,l;if(b!==d){j.oldWidth=d;j.minWidth=j.width=b;if(c.isGroupHeader){k=c.items.items;h=k.length;for(g=0;g<h;g++){l=k[g];if(!l.hidden){e+=(l===j)?b:l.getWidth()}}c.setWidth(e,a)}else{if(a!==false){c.doLayout()}}}},afterComponentLayout:function(d,a,c,g){var e=this,b=e.getOwnerHeaderCt();e.callParent(arguments);if(b&&(d!==c)){b.onHeaderResize(e,d,true)}delete e.oldWidth},setPadding:function(a){var c=this,b=parseInt(c.textEl.getStyle("line-height"),10),d=parseInt(c.textEl.dom.offsetHeight,10);if(!c.isGroupHeader){if(c.titleEl.getHeight()<a){c.titleEl.dom.style.height=a+"px"}}a=c.titleEl.getViewSize().height;if(d){if(b){d=Math.ceil(d/b)*b}c.titleEl.setStyle({paddingTop:Math.max(((a-d)/2),0)+"px"})}if(Ext.isIE&&c.triggerEl){c.triggerEl.setHeight(a)}},onDestroy:function(){var a=this;Ext.destroy(a.textEl,a.keyNav);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleEl.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleEl.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(d,a){var c=this,b=c.ownerCt;if(b&&Ext.Array.indexOf(b.items,c)!==0&&c.isOnLeftEdge(d)){b.expandToFit(c.previousSibling("gridcolumn"))}},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&&!a.ddLock){if(c.triggerEl&&(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&&!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},processEvent:function(g,b,a,c,d,h){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(b){var a=this.up("tablepanel").store;a.sort({property:this.getSortParam(),direction:b})},getSortParam:function(){return this.dataIndex},setSortState:function(a,k,g){var h=this,i=Ext.baseCSSPrefix+"column-header-sort-",j=i+"ASC",c=i+"DESC",b=i+"null",e=h.getOwnerHeaderCt(),d=h.sortState;if(d!==a&&h.getSortParam()){h.addCls(i+a);if(a&&!g){h.doSort(a)}switch(a){case"DESC":h.removeCls([j,b]);break;case"ASC":h.removeCls([c,b]);break;case null:h.removeCls([j,c]);break}if(e&&!h.triStateSort&&!k){e.clearOtherSortStates(h)}h.sortState=a;if(h.triStateSort||a!==null){e.fireEvent("sortchange",e,h,a)}}},hide:function(c){var k=this,e=0,h=k.getOwnerHeaderCt(),b=k.ownerCt,a=b.isGroupHeader,l,j,g,d;if(a&&!c){j=b.query(">:not([hidden])");if(j.length===1&&j[0]==k){k.ownerCt.hide();return}}Ext.suspendLayouts();k.oldWidth=k.getWidth();if(k.isGroupHeader){j=k.items.items;for(d=0,g=j.length;d<g;d++){l=j[d];if(!l.hidden){l.hide(true)}}}k.callParent();h.onHeaderHide(k);if(k.ownerCt.isGroupHeader){j=b.query(">:not([hidden])");if(j.length&&!c){for(d=0,g=j.length;d<g;d++){e+=j[d].getWidth()}b.setWidth(e)}}Ext.resumeLayouts(true)},show:function(b,c){var j=this,a=j.ownerCt,d=0,h,g,e,k;Ext.suspendLayouts();if(j.isSubHeader&&a.hidden){a.show(false,true)}j.callParent(arguments);if(j.isGroupHeader&&c!==true&&!j.query(":not([hidden])").length){h=j.query(">*");for(e=0,g=h.length;e<g;e++){k=h[e];if(k.hidden){k.show(true)}d+=k.getWidth()}j.setWidth(d)}if(a.isGroupHeader&&!b){h=a.query(">:not([hidden])");for(e=0,g=h.length;e<g;e++){d+=h[e].getWidth()}a.minWidth=d;a.setWidth(d)}a=j.getOwnerHeaderCt();if(a){a.onHeaderShow(j)}Ext.resumeLayouts(true)},getDesiredWidth:function(){var a=this;if(a.rendered&&a.componentLayout&&a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return"."+Ext.baseCSSPrefix+"grid-cell-"+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+" ."+Ext.baseCSSPrefix+"grid-cell-inner"},isOnLeftEdge:function(a){return(a.getXY()[0]-this.el.getLeft()<=this.handleWidth)},isOnRightEdge:function(a){return(this.el.getRight()-a.getXY()[0]<=this.handleWidth)}});Ext.define("Ext.grid.RowNumberer",{extend:"Ext.grid.column.Column",alias:"widget.rownumberer",text:"&#160",width:23,sortable:false,draggable:false,align:"right",constructor:function(a){this.width=this.width;this.callParent(arguments);if(this.rowspan){this.renderer=Ext.Function.bind(this.renderer,this)}},resizable:false,hideable:false,menuDisabled:true,dataIndex:"",cls:Ext.baseCSSPrefix+"row-numberer",rowspan:undefined,renderer:function(e,b,a,d,g,c){if(this.rowspan){b.cellAttr='rowspan="'+this.rowspan+'"'}b.tdCls=Ext.baseCSSPrefix+"grid-cell-special";return c.indexOfTotal(a)+1}});Ext.define("Ext.grid.column.Action",{extend:"Ext.grid.column.Column",alias:["widget.actioncolumn"],alternateClassName:"Ext.grid.ActionColumn",actionIdRe:new RegExp(Ext.baseCSSPrefix+"action-col-(\\d+)"),altText:"",sortable:false,constructor:function(d){var h=this,b=Ext.apply({},d),c=b.items||[h],a=c.length,e,g;delete b.items;h.callParent([b]);h.items=c;h.renderer=function(i,j){i=Ext.isFunction(b.renderer)?b.renderer.apply(this,arguments)||"":"";j.tdCls+=" "+Ext.baseCSSPrefix+"action-col-cell";for(e=0;e<a;e++){g=c[e];g.disable=Ext.Function.bind(h.disableAction,h,[e],0);g.enable=Ext.Function.bind(h.enableAction,h,[e],0);i+='<img alt="'+(g.altText||h.altText)+'" src="'+(g.icon||Ext.BLANK_IMAGE_URL)+'" class="'+Ext.baseCSSPrefix+"action-col-icon "+Ext.baseCSSPrefix+"action-col-"+String(e)+" "+(g.disabled?Ext.baseCSSPrefix+"item-disabled":" ")+" "+(Ext.isFunction(g.getClass)?g.getClass.apply(g.scope||h.scope||h,arguments):(h.iconCls||""))+'"'+((g.tooltip)?' data-qtip="'+g.tooltip+'"':"")+" />"}return i}},enableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=false;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).removeCls(c.disabledCls);if(!a){c.fireEvent("enable",c)}},disableAction:function(b,a){var c=this;if(!b){b=0}else{if(!Ext.isNumber(b)){b=Ext.Array.indexOf(c.items,b)}}c.items[b].disabled=true;c.up("tablepanel").el.select("."+Ext.baseCSSPrefix+"action-col-"+b).addCls(c.disabledCls);if(!a){c.fireEvent("disable",c)}},destroy:function(){delete this.items;delete this.renderer;return this.callParent(arguments)},processEvent:function(g,j,k,a,h,c){var d=this,b=c.getTarget().className.match(d.actionIdRe),l,i;if(b){l=d.items[parseInt(b[1],10)];if(l){if(g=="click"){i=l.handler||d.handler;if(i&&!l.disabled){i.call(l.scope||d.scope||d,j,a,h,l,c)}}else{if(g=="mousedown"&&l.stopSelection!==false){return false}}}}return d.callParent(arguments)},cascade:function(b,a){b.call(a||this,this)},getRefItems:function(){return[]}});Ext.define("Ext.grid.column.Boolean",{extend:"Ext.grid.column.Column",alias:["widget.booleancolumn"],alternateClassName:"Ext.grid.BooleanColumn",trueText:"true",falseText:"false",undefinedText:"&#160;",constructor:function(a){this.callParent(arguments);var b=this.trueText,c=this.falseText,d=this.undefinedText;this.renderer=function(e){if(e===undefined){return d}if(!e||e==="false"){return c}return b}}});Ext.define("Ext.grid.column.Date",{extend:"Ext.grid.column.Column",alias:["widget.datecolumn"],requires:["Ext.Date"],alternateClassName:"Ext.grid.DateColumn",initComponent:function(){var a=this;a.callParent(arguments);if(!a.format){a.format=Ext.Date.defaultFormat}a.renderer=Ext.util.Format.dateRenderer(a.format)}});Ext.define("Ext.grid.column.Number",{extend:"Ext.grid.column.Column",alias:["widget.numbercolumn"],requires:["Ext.util.Format"],alternateClassName:"Ext.grid.NumberColumn",format:"0,000.00",constructor:function(a){this.callParent(arguments);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.define("Ext.grid.column.Template",{extend:"Ext.grid.column.Column",alias:["widget.templatecolumn"],requires:["Ext.XTemplate"],alternateClassName:"Ext.grid.TemplateColumn",constructor:function(a){var c=this,b;c.callParent(arguments);b=c.tpl=(!Ext.isPrimitive(c.tpl)&&c.tpl.compile)?c.tpl:new Ext.XTemplate(c.tpl);c.renderer=function(g,h,d){var e=Ext.apply({},d.data,d.getAssociatedData());return b.apply(e)}}});Ext.define("Ext.grid.plugin.Editing",{alias:"editing.editing",requires:["Ext.grid.column.Column","Ext.util.KeyNav"],mixins:{observable:"Ext.util.Observable"},clicksToEdit:2,defaultFieldXType:"textfield",editStyle:"",constructor:function(a){var b=this;Ext.apply(b,a);b.addEvents("beforeedit","edit","validateedit","canceledit");b.mixins.observable.constructor.call(b);b.on("edit",function(c,d){b.fireEvent("afteredit",c,d)})},init:function(a){var b=this;b.grid=a;b.view=a.view;b.initEvents();b.mon(a,"reconfigure",b.onReconfigure,b);b.onReconfigure();a.relayEvents(b,["beforeedit","edit","validateedit","canceledit"]);a.isEditable=true;a.editingPlugin=a.view.editingPlugin=b},onReconfigure:function(){this.initFieldAccessors(this.view.getGridColumns())},destroy:function(){var c=this,b=c.grid,d=b.headerCt,a=b.events;Ext.destroy(c.keyNav);c.removeFieldAccessors(b.getView().getGridColumns());c.clearListeners();delete c.grid.editingPlugin;delete c.grid.view.editingPlugin;delete c.grid;delete c.view;delete c.editor;delete c.keyNav},getEditStyle:function(){return this.editStyle},initFieldAccessors:function(a){var b=this;if(Ext.isArray(a)){Ext.Array.forEach(a,b.initFieldAccessors,b);return}Ext.applyIf(a,{getEditor:function(c,d){return b.getColumnField(this,d)},setEditor:function(c){b.setColumnField(this,c)}})},removeFieldAccessors:function(a){var b=this;if(Ext.isArray(a)){Ext.Array.forEach(a,b.removeFieldAccessors,b);return}delete a.getEditor;delete a.setEditor},getColumnField:function(b,a){var c=b.field;if(!c&&b.editor){c=b.editor;delete b.editor}if(!c&&a){c=a}if(c){if(Ext.isString(c)){c={xtype:c}}if(!c.isFormField){c=Ext.ComponentManager.create(c,this.defaultFieldXType)}b.field=c;Ext.apply(c,{name:b.dataIndex});return c}},setColumnField:function(a,b){if(Ext.isObject(b)&&!b.isFormField){b=Ext.ComponentManager.create(b,this.defaultFieldXType)}a.field=b},initEvents:function(){var a=this;a.initEditTriggers();a.initCancelTriggers()},initCancelTriggers:Ext.emptyFn,initEditTriggers:function(){var c=this,b=c.view,a=c.clicksToEdit===1?"click":"dblclick";c.mon(b,"cell"+a,c.startEditByClick,c);b.on("render",c.addHeaderEvents,c,{single:true})},addHeaderEvents:function(){var a=this;a.mon(a.grid.headerCt,{scope:a,add:a.onColumnAdd,remove:a.onColumnRemove});a.keyNav=Ext.create("Ext.util.KeyNav",a.view.el,{enter:a.onEnterKey,esc:a.onEscKey,scope:a})},onColumnAdd:function(a,b){if(b.isHeader){this.initFieldAccessors(b)}},onColumnRemove:function(a,b){if(b.isHeader){this.removeFieldAccessors(b)}},onEnterKey:function(h){var d=this,c=d.grid,b=c.getSelectionModel(),a,i,g=c.headerCt.getHeaderAtIndex(0);if(b.getCurrentPosition){i=b.getCurrentPosition();a=c.store.getAt(i.row);g=c.headerCt.getHeaderAtIndex(i.column)}else{a=b.getLastSelected()}d.startEdit(a,g)},onEscKey:function(a){this.cancelEdit()},startEditByClick:function(c,a,i,b,h,d,g){if(!c.expanderSelector||!g.getTarget(c.expanderSelector)){this.startEdit(b,c.getHeaderAtIndex(i))}},beforeEdit:Ext.emptyFn,startEdit:function(a,d){var c=this,b=c.getEditingContext(a,d);if(c.beforeEdit(b)===false||c.fireEvent("beforeedit",c,b)===false||b.cancel){return false}c.context=b;c.editing=true},getEditingContext:function(h,c){var i=this,a=i.grid,l=a.store,j=a.getView(),d=j.getNode(h),b,e,g,d,k;if(Ext.isNumber(c)){e=c;c=a.headerCt.getHeaderAtIndex(e)}else{e=c.getIndex()}j=c.ownerCt.lockableInjected?(c.locked?j.lockedView:j.normalView):j;if(Ext.isNumber(h)){b=h;h=j.getRecord(d)}else{b=j.indexOf(d)}k=h.get(c.dataIndex);return{grid:a,record:h,field:c.dataIndex,value:k,row:j.getNode(b),column:c,rowIdx:b,colIdx:e}},cancelEdit:function(){var a=this;a.editing=false;a.fireEvent("canceledit",a,a.context)},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.fireEvent("edit",a,a.context)}delete a.context;a.editing=false},validateEdit:function(){var b=this,a=b.context;return b.fireEvent("validateedit",b,a)!==false&&!a.cancel}});Ext.define("Ext.grid.plugin.CellEditing",{alias:"plugin.cellediting",extend:"Ext.grid.plugin.Editing",requires:["Ext.grid.CellEditor","Ext.util.DelayedTask"],constructor:function(){this.callParent(arguments);this.editors=new Ext.util.MixedCollection(false,function(a){return a.editorId});this.editTask=new Ext.util.DelayedTask()},onReconfigure:function(){this.editors.clear();this.callParent()},destroy:function(){var a=this;a.editTask.cancel();a.editors.each(Ext.destroy,Ext);a.editors.clear();a.callParent(arguments)},onBodyScroll:function(){var a=this.getActiveEditor();if(a&&a.field){if(a.field.triggerBlur){a.field.triggerBlur()}else{a.field.blur()}}},initCancelTriggers:function(){var c=this,b=c.grid,a=b.view;a.addElListener("mousewheel",c.cancelEdit,c);c.mon(a,"bodyscroll",c.onBodyScroll,c);c.mon(b,{columnresize:c.cancelEdit,columnmove:c.cancelEdit,scope:c})},startEdit:function(a,g){var d=this,c=d.getEditingContext(a,g),e,b;d.completeEdit();a=c.record;g=c.column;e=a.get(g.dataIndex);c.originalValue=c.value=e;if(d.beforeEdit(c)===false||d.fireEvent("beforeedit",d,c)===false||c.cancel){return false}if(g&&!g.getEditor(a)){return false}b=d.getEditor(a,g);if(b){d.context=c;d.setActiveEditor(b);d.setActiveRecord(a);d.setActiveColumn(g);d.editTask.delay(15,b.startEdit,b,[d.getCell(a,g),e]);d.editing=true}else{d.grid.getView().getEl(g).focus((Ext.isWebKit||Ext.isIE)?10:false)}},completeEdit:function(){var a=this.getActiveEditor();if(a){a.completeEdit();this.editing=false}},setActiveEditor:function(a){this.activeEditor=a},getActiveEditor:function(){return this.activeEditor},setActiveColumn:function(a){this.activeColumn=a},getActiveColumn:function(){return this.activeColumn},setActiveRecord:function(a){this.activeRecord=a},getActiveRecord:function(){return this.activeRecord},getEditor:function(a,d){var g=this,e=g.editors,c=d.getItemId(),b=e.getByKey(c);if(b){return b}else{b=d.getEditor(a);if(!b){return false}if(!(b instanceof Ext.grid.CellEditor)){b=new Ext.grid.CellEditor({editorId:c,field:b,editingPlugin:g,ownerCt:g.grid})}b.on({scope:g,specialkey:g.onSpecialKey,complete:g.onEditComplete,canceledit:g.cancelEdit});e.add(b);return b}},setColumnField:function(b,c){var a=this.editors.getByKey(b.getItemId());Ext.destroy(a,b.field);this.editors.removeAtKey(b.getItemId());this.callParent(arguments)},getCell:function(a,b){return this.grid.getView().getCell(a,b)},onSpecialKey:function(a,d,c){var b=this.grid,g;if(c.getKey()===c.TAB){c.stopEvent();g=b.getSelectionModel();if(g.onEditorTab){g.onEditorTab(this,c)}}},onEditComplete:function(c,h,b){var g=this,d=g.grid,e=g.getActiveColumn(),a;if(e){a=g.context.record;g.setActiveEditor(null);g.setActiveColumn(null);g.setActiveRecord(null);delete d.getSelectionModel().wasEditing;if(!g.validateEdit()){return}if(!a.isEqual(h,b)){a.set(e.dataIndex,h)}else{d.getView().getEl(e).focus()}g.context.value=h;g.fireEvent("edit",g,g.context)}},cancelEdit:function(){var c=this,b=c.getActiveEditor(),a=c.grid.getView().getEl(c.getActiveColumn());c.setActiveEditor(null);c.setActiveColumn(null);c.setActiveRecord(null);if(b){b.cancelEdit();a.focus();c.callParent(arguments)}},startEditByPosition:function(a){var b=this.grid.getSelectionModel();if(b.selectByPosition){b.selectByPosition(a)}this.startEdit(a.row,a.column)}});Ext.define("Ext.layout.container.CheckboxGroup",{extend:"Ext.layout.container.Container",alias:["layout.checkboxgroup"],requires:["Ext.layout.container.HBox"],childGeneration:0,autoFlex:true,type:"checkboxgroup",childEls:["innerCt"],renderTpl:['<table id="{ownerId}-innerCt" role="presentation" style="{tableStyle}"><tbody><tr>','<tpl for="columns">','<td class="{parent.colCls}" valign="top" style="{style}">',"{% this.renderColumn(out,parent,xindex-1) %}","</td>","</tpl>","</tr></tbody></table>"],beginLayout:function(b){var j=this,d=j.columnEls,c,h,e,a,k=j.autoFlex,g=false;j.callParent(arguments);h=b.childItems;if(j.lastChildGeneration!=j.childGeneration){j.lastChildGeneration=j.childGeneration;j.fixColumns()}b.innerCtContext=b.getEl("innerCt",j);Ext.layout.container.Box.prototype.cacheFlexes.call(j,b);if(!b.widthModel.shrinkWrap){c=d.length;if(j.columnsArray){for(e=0;e<c;e++){a=j.owner.columns[e];d[e].style.width=(g|=(a<1))?(a*100)+"%":a+"px"}}else{for(e=0;e<c;e++){if(h[e].flex){d[e].style.width=(h[e].flex/b.totalFlex*100)+"%";g=true}else{if(h[e].width){d[e].style.width=h[e].width+"px";k=false}else{if(j.evenColumns){d[e].style.width=(1/c*100)+"%";g=true}}}}}if(g||k){j.innerCt.dom.style.tableLayout="fixed";j.innerCt.dom.style.width="100%"}else{j.innerCt.dom.style.tableLayout="auto";j.innerCt.dom.style.width="auto"}}},cacheElements:function(){var a=this;a.callParent();a.columnEls=a.innerCt.query("td."+a.owner.groupCls);a.lastChildGeneration=a.childGeneration},calculate:function(h){var e=this;if(!h.getDomProp("containerChildrenDone")){e.done=false}else{var c=h.innerCtContext,b=h.widthModel.shrinkWrap,a=h.heightModel.shrinkWrap,i=a||b,d=c.el.dom,g=i&&c.getPaddingInfo();if(b){h.setContentWidth(d.offsetWidth+g.width,true)}if(a){h.setContentHeight(d.offsetHeight+g.height,true)}}},doRenderColumn:function(d,l,g){var i=l.$layout,c=i.owner,e=l.columnCount,h=c.items.items,b=h.length,m,a,j,k,n;if(c.vertical){j=Math.ceil(b/e);a=g*j;b=Math.min(b,a+j);k=1}else{a=g;k=e}for(;a<b;a+=k){m=h[a];i.configureItem(m);n=m.getRenderTree();Ext.DomHelper.generateMarkup(n,d)}},fixColumns:function(){var j=this,b=j.owner,c=j.columns,h=b.items.items,e=c.length,a=h.length,g,d,k;if(b.vertical){g=-1;k=Math.ceil(a/e);for(d=0;d<a;++d){if(d%k===0){++g}c[g].appendChild(h[d].el.dom)}}else{for(d=0;d<a;++d){g=d%e;c[g].appendChild(h[d].el.dom)}}},getColumnCount:function(){var b=this,a=b.owner,c=a.columns;if(b.columnsArray){return c.length}if(Ext.isNumber(c)){return c}return a.items.length},getItemSizePolicy:function(a){return this.autoSizePolicy},getRenderData:function(){var l=this,g=l.callParent(),b=l.owner,h=0,d=l.getColumnCount(),k=b.items.items,a,m,c,e,n=l.autoFlex,j=false;if(!l.columnsArray){for(;h<d;h++){if(k[h].flex){e+=k[h].flex}}}g.colCls=b.groupCls;g.columnCount=l.getColumnCount();g.columns=[];for(h=0;h<d;h++){c=(g.columns[h]={});if(l.columnsArray){a=l.owner.columns[h];c.style="width:"+((j|=(a<1))?(a*100)+"%":a+"px")}else{m=k[h];if(m.flex){c.style="width:"+(m.flex/e*100)+"%";j=true}else{if(m.width){c.style="width:"+m.width+"px";n=false}else{if(l.evenColumns){c.style="width:"+(1/d*100)+"%";j=true}}}}}g.tableStyle=j||n?"table-layout:fixed;width:100%":"";return g},getRenderTarget:function(){return this.innerCt},initLayout:function(){var b=this,a=b.owner;b.columnsArray=Ext.isArray(a.columns);b.evenColumns=Ext.isNumber(a.columns);b.callParent()},isValidParent:function(){return true},onAdd:function(){this.callParent(arguments);++this.childGeneration},onRemove:function(){this.callParent(arguments);++this.childGeneration},setupRenderTpl:function(a){this.callParent(arguments);a.renderColumn=this.doRenderColumn}},function(){this.prototype.names=Ext.layout.container.HBox.prototype.names;this.prototype.getNames=Ext.layout.container.HBox.prototype.getNames});Ext.define("Ext.form.CheckboxGroup",{extend:"Ext.form.FieldContainer",mixins:{field:"Ext.form.field.Field"},alias:"widget.checkboxgroup",requires:["Ext.layout.container.CheckboxGroup","Ext.form.field.Base"],columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkboxfield",groupCls:Ext.baseCSSPrefix+"form-check-group",fieldBodyCls:Ext.baseCSSPrefix+"form-checkboxgroup-body",layout:"checkboxgroup",initComponent:function(){var a=this;a.callParent();a.initField()},initValue:function(){var b=this,a=b.value;b.originalValue=b.lastValue=a||b.getValue();if(a){b.setValue(a)}},onFieldAdded:function(b){var a=this;if(b.isCheckbox){a.mon(b,"change",a.checkChange,a)}a.callParent(arguments)},onFieldRemoved:function(b){var a=this;if(b.isCheckbox){a.mun(b,"change",a.checkChange,a)}a.callParent(arguments)},isEqual:function(b,a){var c=Ext.Object.toQueryString;return c(b)===c(a)},getErrors:function(){var a=[];if(!this.allowBlank&&Ext.isEmpty(this.getChecked())){a.push(this.blankText)}return a},getBoxes:function(a){a=a||"";return this.query("[isCheckbox]"+a)},eachBox:function(b,a){Ext.Array.forEach(this.getBoxes(),b,a||this)},getChecked:function(){return this.getBoxes("[checked]")},isDirty:function(){return Ext.Array.some(this.getBoxes(),function(a){return a.isDirty()})},setReadOnly:function(a){this.eachBox(function(b){b.setReadOnly(a)});this.readOnly=a},reset:function(){var c=this,b=c.hasActiveError(),a=c.preventMark;c.preventMark=true;c.batchChanges(function(){c.eachBox(function(d){d.reset()})});c.preventMark=a;c.unsetActiveError();if(b){c.updateLayout()}},resetOriginalValue:function(){var a=this;a.eachBox(function(b){b.resetOriginalValue()});a.originalValue=a.getValue();a.checkDirty()},setValue:function(b){var a=this;a.batchChanges(function(){a.eachBox(function(c){var d=c.getName(),e=false;if(b&&d in b){if(Ext.isArray(b[d])){e=Ext.Array.contains(b[d],c.inputValue)}else{e=b[d]}}c.setValue(e)})});return a},getValue:function(){var a={};this.eachBox(function(c){var d=c.getName(),b=c.inputValue,e;if(c.getValue()){if(d in a){e=a[d];if(!Ext.isArray(e)){e=a[d]=[e]}e.push(b)}else{a[d]=b}}});return a},getSubmitData:function(){return null},getModelData:function(){return null},validate:function(){var a=this,d,c,b;if(a.disabled){c=true}else{d=a.getErrors();c=Ext.isEmpty(d);b=!a.hasActiveError();if(c){a.unsetActiveError()}else{a.setActiveError(d)}}if(c!==b){a.fireEvent("validitychange",a,c);a.updateLayout()}return c}},function(){this.borrow(Ext.form.field.Base,["markInvalid","clearInvalid"])});Ext.define("Ext.form.RadioGroup",{extend:"Ext.form.CheckboxGroup",alias:"widget.radiogroup",allowBlank:true,blankText:"You must select one item in this group",defaultType:"radiofield",groupCls:Ext.baseCSSPrefix+"form-radio-group",getBoxes:function(){return this.query("[isRadio]")},checkChange:function(){var b=this.getValue(),a=Ext.Object.getKeys(b)[0];if(Ext.isArray(b[a])){return}this.callParent(arguments)},setValue:function(b){var a=this;if(Ext.isObject(b)){Ext.Object.each(b,function(c,h){var e=a.items.first(),d=e?e.getFormId():null,g=Ext.form.RadioManager.getWithValue(c,h,d);g.each(function(i){i.setValue(true)})})}return a}});Ext.define("Ext.layout.container.VBox",{alias:["layout.vbox"],extend:"Ext.layout.container.Box",alternateClassName:"Ext.layout.VBoxLayout",align:"left",type:"vbox",direction:"vertical",horizontal:false,names:{lr:"tb",left:"top",leftCap:"Top",right:"bottom",position:"top",width:"height",widthCap:"Height",widthIndex:1,x:"y",center:"center",top:"left",topPosition:"left",bottom:"right",height:"width",heightCap:"Width",heightIndex:0,y:"x"},sizePolicy:{flex:{"":{setsWidth:0,setsHeight:1},stretch:{setsWidth:1,setsHeight:1},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:1}},"":{setsWidth:0,setsHeight:0},stretch:{setsWidth:1,setsHeight:0},stretchmax:{readsWidth:1,setsWidth:1,setsHeight:0}}});Ext.define("Ext.layout.container.Accordion",{extend:"Ext.layout.container.VBox",alias:["layout.accordion"],alternateClassName:"Ext.layout.AccordionLayout",itemCls:Ext.baseCSSPrefix+"box-item "+Ext.baseCSSPrefix+"accordion-item",align:"stretch",fill:true,autoWidth:true,titleCollapse:true,hideCollapseTool:false,collapseFirst:false,animate:true,activeOnTop:false,multi:false,defaultAnimatePolicy:{y:true,height:true},constructor:function(){var a=this;a.callParent(arguments);if(a.animate){a.animatePolicy=Ext.apply({},a.defaultAnimatePolicy)}else{a.animatePolicy=null}if(a.fill===false){a.itemCls=Ext.baseCSSPrefix+"accordion-item"}},beforeLayout:function(){var a=this;a.callParent(arguments);if(a.fill){if(!(a.owner.el.dom.style.height||a.getLayoutTargetSize().height)){return false}}else{a.owner.componentLayout.monitorChildren=false;a.autoSize=true;a.owner.setAutoScroll(true)}},beforeRenderItems:function(b){var e=this,d=b.length,c=0,a;for(;c<d;c++){a=b[c];if(!a.rendered){a.on({beforerender:e.onChildPanelRender,single:true});if(e.collapseFirst){a.collapseFirst=e.collapseFirst}if(e.hideCollapseTool){a.hideCollapseTool=e.hideCollapseTool;a.titleCollapse=true}else{if(e.titleCollapse){a.titleCollapse=e.titleCollapse}}delete a.hideHeader;delete a.width;a.collapsible=true;a.title=a.title||"&#160;";a.addBodyCls(Ext.baseCSSPrefix+"accordion-body");if(e.fill){if(e.expandedItem!==undefined){a.collapsed=true}else{if(a.hasOwnProperty("collapsed")&&a.collapsed===false){e.expandedItem=c}else{a.collapsed=true}}e.owner.mon(a,{show:e.onComponentShow,beforeexpand:e.onComponentExpand,beforecollapse:e.onComponentCollapse,scope:e})}else{a.animCollapse=e.initialAnimate;a.autoScroll=false}a.border=a.collapsed}}if(d&&e.expandedItem===undefined){e.expandedItem=0;a=b[0];a.collapsed=a.border=false}},getItemsRenderTree:function(a){this.beforeRenderItems(a);return this.callParent(arguments)},renderItems:function(a,b){this.beforeRenderItems(a);this.callParent(arguments)},configureItem:function(a){this.callParent(arguments);a.animCollapse=false;if(this.fill){a.flex=1}},onChildPanelRender:function(a){a.header.addCls(Ext.baseCSSPrefix+"accordion-hd")},beginLayout:function(a){this.callParent(arguments);this.updatePanelClasses(a)},calculate:function(h){var g=this,e;if(g.fill){g.callParent(arguments)}else{var d=g.getContainerSize(h),b=h.childItems,a=b.length,c;for(c=0;c<a;c++){e=b[c];if(e.target.collapsed){e.setWidth(d.width)}else{e.setSize(null,null)}}}return g},updatePanelClasses:function(h){var e=h.visibleItems,g=e.length,c=true,a=h.context,d,j,b;for(d=0;d<g;d++){j=e[d];b=a.getCmp(j.header);if(c){b.removeCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}else{b.addCls(Ext.baseCSSPrefix+"accordion-hd-sibling-expanded")}if(d+1==g&&j.collapsed){b.addCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}else{b.removeCls(Ext.baseCSSPrefix+"accordion-hd-last-collapsed")}c=j.collapsed}},onComponentExpand:function(h){var e=this,a=e.owner,c,g,d,b;if(!e.processing){e.processing=true;b=a.deferLayouts;a.deferLayouts=true;c=e.multi?[]:a.query(">panel:not([collapsed])");g=c.length;for(d=0;d<g;d++){c[d].collapse()}a.deferLayouts=b;e.processing=false}},onComponentCollapse:function(d){var e=this,a=e.owner,g,c,b;if(!e.processing){e.processing=true;b=a.deferLayouts;a.deferLayouts=true;g=d.next()||d.prev();if(e.multi){c=e.owner.query(">panel:not([collapsed])");if(c.length===1){g.expand()}}else{g.expand()}a.deferLayouts=b;e.processing=false}},onComponentShow:function(a){this.onComponentExpand(a)}});Ext.define("Ext.toolbar.Spacer",{extend:"Ext.Component",alias:"widget.tbspacer",alternateClassName:"Ext.Toolbar.Spacer",baseCls:Ext.baseCSSPrefix+"toolbar-spacer",focusable:false});Ext.define("Ext.toolbar.TextItem",{extend:"Ext.toolbar.Item",requires:["Ext.XTemplate"],alias:"widget.tbtext",alternateClassName:"Ext.Toolbar.TextItem",text:"",renderTpl:"{text}",baseCls:Ext.baseCSSPrefix+"toolbar-text",beforeRender:function(){var a=this;a.callParent();Ext.apply(a.renderData,{text:a.text})},setText:function(a){if(this.rendered){this.el.update(a);this.ownerCt.doLayout()}else{this.text=a}}});Ext.define("Ext.toolbar.Toolbar",{extend:"Ext.container.Container",requires:["Ext.toolbar.Fill","Ext.layout.container.HBox","Ext.layout.container.VBox"],uses:["Ext.toolbar.Separator"],alias:"widget.toolbar",alternateClassName:"Ext.Toolbar",isToolbar:true,baseCls:Ext.baseCSSPrefix+"toolbar",ariaRole:"toolbar",defaultType:"button",vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+"toolbar-more-icon",trackMenus:true,itemCls:Ext.baseCSSPrefix+"toolbar-item",statics:{shortcuts:{"-":"tbseparator"," ":"tbspacer"},shortcutsHV:{0:{"->":{xtype:"tbfill",height:0}},1:{"->":{xtype:"tbfill",width:0}}}},initComponent:function(){var b=this,a;if(!b.layout&&b.enableOverflow){b.layout={overflowHandler:"Menu"}}if(b.dock==="right"||b.dock==="left"){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?"vbox":"hbox",align:b.vertical?"stretchmax":"middle",clearInnerCtOnLayout:true});if(b.vertical){b.addClsWithUI("vertical")}if(b.ui==="footer"){b.ignoreBorderManagement=true}b.callParent();b.addEvents("overflowchange")},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&&e.enableOverflow){c=d.overflowHandler;if(c&&c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(d){if(typeof d=="string"){var b=Ext.toolbar.Toolbar,a=b.shortcutsHV[this.vertical?1:0][d]||b.shortcuts[d];if(typeof a=="string"){d={xtype:a}}else{if(a){d=Ext.apply({},a)}else{d={xtype:"tbtext",text:d}}}this.applyDefaults(d)}return this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b},trackMenu:function(c,a){if(this.trackMenus&&c.menu){var d=a?"mun":"mon",b=this;b[d](c,"mouseover",b.onButtonOver,b);b[d](c,"menushow",b.onButtonMenuShow,b);b[d](c,"menuhide",b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:Ext.widget(a.split?"splitbutton":this.defaultType,a)},onBeforeAdd:function(a){if(a.is("field")||(a.is("button")&&this.ui!="footer")){a.ui=a.ui+"-toolbar"}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?"vertical":"horizontal")}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a)},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},getChildItemsToDisable:function(){return this.items.getRange()},onButtonOver:function(a){if(this.activeMenuBtn&&this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}});Ext.define("Ext.panel.AbstractPanel",{extend:"Ext.container.Container",mixins:{docking:"Ext.container.DockingContainer"},requires:["Ext.util.MixedCollection","Ext.Element","Ext.toolbar.Toolbar"],baseCls:Ext.baseCSSPrefix+"panel",isPanel:true,componentLayout:"dock",childEls:["body"],renderTpl:["{% this.renderDockedItems(out,values,0); %}",'<div id="{id}-body" class="{baseCls}-body<tpl if="bodyCls"> {bodyCls}</tpl>',' {baseCls}-body-{ui}<tpl if="uiCls">','<tpl for="uiCls"> {parent.baseCls}-body-{parent.ui}-{.}</tpl>','</tpl>"<tpl if="bodyStyle"> style="{bodyStyle}"</tpl>>',"{%this.renderContainer(out,values);%}","</div>","{% this.renderDockedItems(out,values,1); %}"],bodyPosProps:{x:"x",y:"y"},border:true,initComponent:function(){var a=this;a.addEvents("bodyresize");if(a.frame&&a.border&&a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&&a.border&&(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},beforeDestroy:function(){this.destroyDockedItems();this.callParent()},initItems:function(){this.callParent();this.initDockingItems()},initRenderData:function(){var a=this,b=a.callParent();a.initBodyStyles();a.protoBody.writeTo(b);delete a.protoBody;return b},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&&!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},getProtoBody:function(){var b=this,a=b.protoBody;if(!a){b.protoBody=a=new Ext.util.ProtoElement({cls:b.bodyCls,style:b.bodyStyle,clsProp:"bodyCls",styleProp:"bodyStyle",styleIsText:true})}return a},initBodyStyles:function(){var c=this,a=c.getProtoBody(),b=Ext.Element;if(c.bodyPadding!==undefined){a.setStyle("padding",b.unitizeBox((c.bodyPadding===true)?5:c.bodyPadding))}if(c.frame&&c.bodyBorder){if(!Ext.isNumber(c.bodyBorder)){c.bodyBorder=1}a.setStyle("border-width",b.unitizeBox(c.bodyBorder))}},getCollapsedDockedItems:function(){return[this.getReExpander()]},setBodyStyle:function(b,d){var c=this,a=c.rendered?c.body:c.getProtoBody();if(Ext.isFunction(b)){b=b()}if(arguments.length==1&&Ext.isString(b)){b=Ext.Element.parseStyles(b)}a.setStyle.apply(c.body,arguments)},addBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.addCls(b)},removeBodyCls:function(b){var c=this,a=c.rendered?c.body:c.getProtoBody();a.removeCls(b)},addUIClsToElement:function(b,d){var c=this,a=c.callParent(arguments);c.addBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},removeUIClsFromElement:function(b,d){var c=this,a=c.callParent(arguments);c.removeBodyCls([Ext.baseCSSPrefix+b,c.baseCls+"-body-"+b,c.baseCls+"-body-"+c.ui+"-"+b]);return a},addUIToElement:function(b){var a=this;a.callParent(arguments);a.addBodyCls(a.baseCls+"-body-"+a.ui)},removeUIFromElement:function(){var a=this;a.callParent(arguments);a.removeBodyCls(a.baseCls+"-body-"+a.ui)},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments);return this.getDockingRefItems(a,b)},setupRenderTpl:function(a){this.callParent(arguments);this.setupDockingRenderTpl(a)}});Ext.define("Ext.panel.Panel",{extend:"Ext.panel.AbstractPanel",requires:["Ext.panel.Header","Ext.fx.Anim","Ext.util.KeyMap","Ext.panel.DD","Ext.XTemplate","Ext.layout.component.Dock","Ext.util.Memento"],alias:"widget.panel",alternateClassName:"Ext.Panel",collapsedCls:"collapsed",animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:"destroy",preventHeader:false,headerPosition:"top",frame:false,frameHeader:true,initComponent:function(){var b=this,a;b.addEvents("beforeclose","close","beforeexpand","beforecollapse","expand","collapse","titlechange","iconchange","iconclschange");if(b.collapsible){this.addStateEvents(["expand","collapse"])}if(b.unstyled){b.setUI("plain")}if(b.frame){b.setUI(b.ui+"-framed")}b.bridgeToolbars();b.callParent();b.collapseDirection=b.collapseDirection||b.headerPosition||Ext.Component.DIRECTION_TOP},beforeDestroy:function(){Ext.destroy(this.ghostPanel,this.dd);this.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},getFocusEl:function(){return this.el},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&&c){a.dom.setAttribute("aria-labelledby",c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(d){var b=this,a=b.title,c=b.header;b.title=d;if(c){if(c.isHeader){b.header.setTitle(d)}else{c.title=d}}if(b.reExpander){b.reExpander.setTitle(d)}b.fireEvent("titlechange",b,d,a)},setIconCls:function(a){var c=this,b=c.iconCls,d=c.header;c.iconCls=a;if(d){if(d.isHeader){d.setIconCls(a)}else{d.iconCls=a}}c.fireEvent("iconclschange",c,a,b)},setIcon:function(a){var b=this,c=b.icon,d=b.header;b.icon=a;if(d){if(d.isHeader){d.setIcon(a)}else{d.icon=a}}b.fireEvent("iconchange",b,a,c)},bridgeToolbars:function(){var a=this,g=[],c,b,e=a.minButtonWidth;function d(h,j,i){if(Ext.isArray(h)){h={xtype:"toolbar",items:h}}else{if(!h.xtype){h.xtype="toolbar"}}h.dock=j;if(j=="left"||j=="right"){h.vertical=true}if(i){h.layout=Ext.applyIf(h.layout||{},{pack:{left:"start",center:"center"}[a.buttonAlign]||"end"})}return h}if(a.tbar){g.push(d(a.tbar,"top"));a.tbar=null}if(a.bbar){g.push(d(a.bbar,"bottom"));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,"bottom",true);c.ui="footer";if(e){b=c.defaults;c.defaults=function(h){var i=b||{};if((!h.xtype||h.xtype==="button"||(h.isComponent&&h.isXType("button")))&&!("minWidth" in i)){i=Ext.apply({minWidth:e},i)}return i}}g.push(c);a.fbar=null}if(a.lbar){g.push(d(a.lbar,"left"));a.lbar=null}if(a.rbar){g.push(d(a.rbar,"right"));a.rbar=null}if(a.dockedItems){if(!Ext.isArray(a.dockedItems)){a.dockedItems=[a.dockedItems]}a.dockedItems=a.dockedItems.concat(g)}else{a.dockedItems=g}},beforeRender:function(){var b=this,a;b.callParent();if(b.collapsed){if(b.collapseMode==="placeholder"){b.hidden=true;b.protoEl.setStyle("z-index",5);b.placeholderCollapse();a=b.collapsed;b.collapsed=false}else{b.beginCollapse();b.addClsWithUI(b.collapsedCls)}}b.initTools();b.updateHeader();if(a){b.collapsed=a}},initTools:function(){var a=this;a.tools=a.tools?Ext.Array.clone(a.tools):[];if(a.collapsible&&!(a.hideCollapseTool||a.header===false)){a.collapseDirection=a.collapseDirection||a.headerPosition||"top";a.collapseTool=a.expandTool=Ext.widget({xtype:"tool",type:a.collapsed?("expand-"+a.getOppositeDirection(a.collapseDirection)):("collapse-"+a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI("closable");a.addTool({type:"close",handler:Ext.Function.bind(a.close,a,[])})}if(a.collapseTool&&!a.collapseFirst){a.tools.push(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent("beforeclose",this)!==false){this.doClose()}},doClose:function(){this.fireEvent("close",this);this[this.closeAction]()},updateHeader:function(b){var a=this,e=a.header,d=a.title,c=a.tools;if(!a.preventHeader&&(b||d||(c&&c.length))){if(e){e.show()}else{e=a.header=new Ext.panel.Header({title:d,orientation:(a.headerPosition=="left"||a.headerPosition=="right")?"vertical":"horizontal",dock:a.headerPosition||"top",textCls:a.headerTextCls,iconCls:a.iconCls,icon:a.icon,baseCls:a.baseCls+"-header",tools:c,ui:a.ui,id:a.id+"_header",indicateDrag:a.draggable,border:a.border,frame:a.frame&&a.frameHeader,ignoreParentFrame:a.frame||a.overlapHeader,ignoreBorderManagement:a.frame||a.ignoreHeaderBorderManagement,listeners:a.collapsible&&a.titleCollapse?{click:a.toggleCollapse,scope:a}:null});a.addDocked(e,0);a.tools=e.tools}a.initHeaderAria()}else{if(e){e.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header){a.header.setUI(b)}},getContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},isVisible:function(a){var b=this;if(b.collapsed&&b.placeholder){return b.placeholder.isVisible(a)}return b.callParent(arguments)},onHide:function(){var a=this;if(a.collapsed&&a.placeholder){a.placeholder.hide()}else{a.callParent(arguments)}},onShow:function(){var a=this;if(a.collapsed&&a.placeholder){a.hidden=true;a.placeholder.show()}else{a.callParent(arguments)}},addTool:function(a){var b=this,c=b.header;if(Ext.isArray(a)){Ext.each(a,b.addTool,b);return}b.tools.push(a);if(c){c.addTool(a)}b.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},getWidthAuthority:function(){if(this.collapsed&&this.collapsedHorizontal()){return 1}return this.callParent()},getHeightAuthority:function(){if(this.collapsed&&this.collapsedVertical()){return 1}return this.callParent()},collapsedHorizontal:function(){var a=this.getCollapsed();return a=="left"||a=="right"},collapsedVertical:function(){var a=this.getCollapsed();return a=="top"||a=="bottom"},getCollapsed:function(){var a=this;if(a.collapsed===true){return a.collapseDirection}return a.collapsed},getState:function(){var a=this,b=a.callParent(),c;b=a.addPropertyToState(b,"collapsed");if(a.collapsed){c=a.collapseMemento;c=c&&c.data;if(a.collapsedVertical()){if(b){delete b.height}if(c){b=a.addPropertyToState(b,"height",c.height)}}else{if(b){delete b.width}if(c){b=a.addPropertyToState(b,"width",c.width)}}}return b},findReExpander:function(h){var g=this,j=Ext.Component,e=g.dockedItems.items,a=e.length,b,d;switch(h){case j.DIRECTION_TOP:case j.DIRECTION_BOTTOM:for(d=0;d<a;d++){b=e[d];if(b.isVisible()){if(b.isHeader&&(!b.dock||b.dock=="top"||b.dock=="bottom")){return b}}}break;case j.DIRECTION_LEFT:case j.DIRECTION_RIGHT:for(d=0;d<a;d++){b=e[d];if(b.isVisible()){if(b.isHeader&&(b.dock=="left"||b.dock=="right")){return b}}}break;default:throw ("Panel#findReExpander must be passed a valid collapseDirection")}},getReExpander:function(e){var c=this,d=c.collapsedCls,h=e||c.collapseDirection,b=c.reExpander||c.findReExpander(h),g,a;c.expandDirection=c.getOppositeDirection(h);if(!b){c.reExpander=b=Ext.widget(c.createReExpander(h,{dock:h,cls:Ext.baseCSSPrefix+"docked "+c.baseCls+"-"+c.ui+"-collapsed",ownerCt:c,ownerLayout:c.componentLayout}));c.dockedItems.insert(0,b)}a=[d,d+"-"+b.dock];if(c.border&&(!c.frame||(c.frame&&Ext.supports.CSS3BorderRadius))){a.push(d+"-border-"+b.dock)}if(c.isCollapsingOrExpanding==1){g=true}else{if(c.isCollapsingOrExpanding!=2){g=c.collapsed}}if(g){if(b.hidden){b.suspendLayouts();b.show();b.resumeLayouts()}b.addClsWithUI(a)}else{b.removeClsWithUI(a)}return b},createReExpander:function(d,c){var b=this,a=Ext.apply({xtype:"header",hideMode:"offsets",temporary:true,title:b.title,orientation:(d=="top"||d=="bottom")?"horizontal":"vertical",textCls:b.headerTextCls,iconCls:b.iconCls,baseCls:b.baseCls+"-header",ui:b.ui,frame:b.frame&&b.frameHeader,ignoreParentFrame:b.frame||b.overlapHeader,indicateDrag:b.draggable,style:{"z-index":2}},c);if(!b.hideCollapseTool){a[(a.orientation=="horizontal")?"tools":"items"]=[{xtype:"tool",type:"expand-"+b.getOppositeDirection(d),handler:b.toggleCollapse,scope:b}]}return a},beginCollapse:function(){var b=this,a=b.lastBox;if(!b.collapseMemento){b.collapseMemento=new Ext.util.Memento(b)}if(b.collapsedVertical()){b.collapseMemento.capture(["height","minHeight"]);if(a){b.collapseMemento.capture("height",a,"last.")}delete b.height;b.minHeight=0}else{b.collapseMemento.capture(["width","minWidth"]);if(a){b.collapseMemento.capture("width",a,"last.")}delete b.width;b.minWidth=0}if(b.ownerCt){b.ownerCt.getLayout().beginCollapse(b)}if(b.resizer){b.resizer.disable()}},beginExpand:function(){var b=this,a=b.lastBox;if(b.collapsedVertical()){b.collapseMemento.restore(["height","minHeight"]);if(a){b.collapseMemento.restore("height",true,a,"last.")}}else{b.collapseMemento.restore(["width","minWidth"]);if(a){b.collapseMemento.restore("width",true,a,"last.")}}if(b.ownerCt){b.ownerCt.getLayout().beginExpand(b)}},collapse:function(d,a){var c=this,e=d||c.collapseDirection,b=c.ownerCt;if(arguments.length<2){a=c.animCollapse}if(c.collapsed||c.fireEvent("beforecollapse",c,d,a)===false){return c}if(b&&c.collapseMode==="placeholder"){return c.placeholderCollapse(d,a)}c.collapsed=e;c.beginCollapse();return c.doCollapseExpand(1,a)},doCollapseExpand:function(a,b){var c=this,d=c.ownerLayout;c.isCollapsingOrExpanding=a;c.getReExpander().updateFrame();if(d&&!b){d.onContentChange(c)}else{c.updateLayout({isRoot:true})}return c},afterCollapse:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=false;if(a.collapseTool){a.collapseTool.setType("expand-"+a.getOppositeDirection(a.collapseDirection))}if(c&&b){c.onContentChange(a)}a.fireEvent("collapse",a)},createPlaceholder:function(c){var b=this,d=c||b.collapseDirection,a=null;if(b.floatable||(b.collapsible&&b.titleCollapse)){a={click:{fn:b.floatable?b.floatCollapsedPanel:b.toggleCollapse,element:"el",scope:b}}}return Ext.widget(b.createReExpander(d,{id:b.id+"-placeholder",placeholderFor:b,margins:b.margins,cls:Ext.baseCSSPrefix+"region-collapsed-placeholder "+Ext.baseCSSPrefix+"region-collapsed-"+d+"-placeholder "+b.collapsedCls,listeners:a}))},placeholderCollapse:function(e,a){var d=this,c=d.ownerCt,g=e||d.collapseDirection,b=Ext.baseCSSPrefix+"border-region-slide-in";d.hidden=true;d.collapsed=g;if(d.placeholder){d.placeholder.hidden=false;d.placeholder.el.show();c.updateLayout()}else{d.placeholder=d.createPlaceholder(g);c.insert(c.items.indexOf(d),d.placeholder)}if(d.rendered){if(a){d.el.addCls(b);d.placeholder.el.hide();d.el.slideOut(g.substr(0,1),{duration:Ext.Number.from(a,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.el.removeCls(b);d.placeholder.el.show().slideIn(g.substr(0,1),{easing:"linear",duration:100,listeners:{afteranimate:d.placeholder.focus,scope:d.placeholder}})}}})}else{d.el.hide()}}d.fireEvent("collapse",d);return d},floatCollapsedPanel:function(){var d=this,h=d.placeholder,c=h.getBox(true),e,b=Ext.baseCSSPrefix+"border-region-slide-in",g=d.collapsed;if(d.el.hasCls(b)){return d.slideOutFloatedPanel()}function a(j){var i=d.el.getRegion().union(h.el.getRegion()).adjust(1,-1,-1,1);if(!i.contains(j.getPoint())){d.slideOutFloatedPanel()}}d.collapsed=false;d.placeholder.el.hide();d.placeholder.hidden=true;d.el.show();d.updateLayout();e=d.getBox(true);d.collapsed=g;d.placeholder.el.show();d.placeholder.hidden=false;d.el.hide();d.updateLayout();d.placeholderMouseMon=h.el.monitorMouseLeave(500,a);d.panelMouseMon=d.el.monitorMouseLeave(500,a);d.el.addCls(b);d.collapseTool.el.hide();switch(d.collapsed){case"top":d.el.setLeftTop(c.x,c.y+c.height-1);d.el.slideIn("t");break;case"right":d.el.setLeftTop(c.x-e.width+1,c.y);d.el.slideIn("r");break;case"bottom":d.el.setLeftTop(c.x,c.y-e.height+1);d.el.slideIn("b");break;case"left":d.el.setLeftTop(c.x+c.width-1,c.y);d.el.slideIn("l");break}},slideOutFloatedPanel:function(){var b=this,d=this.el,a=Ext.baseCSSPrefix+"border-region-slide-in",c;d.un(b.panelMouseMon);b.placeholder.el.un(b.placeholderMouseMon);b.collapseTool.el.show();b.el.removeCls(a);if(typeof b.collapsed=="string"){c=b.collapsed.charAt(0)}d.slideOut(c,b.slideOutAnim)},expand:function(a){var b=this;if(arguments.length<2){a=b.animCollapse}if(!b.collapsed||b.fireEvent("beforeexpand",b,a)===false){return b}if(b.collapseMode==="placeholder"){return b.placeholderExpand(a)}if(b.reExpander){b.reExpander.hidden=true;b.reExpander.el.hide()}b.beginExpand();b.collapsed=false;return b.doCollapseExpand(2,a)},placeholderExpand:function(b){var d=this,h=d.collapsed,c=Ext.baseCSSPrefix+"border-region-slide-in",e,a,g;if(d.el.hasCls(c)){d.el.un(d.panelMouseMon);d.placeholder.el.un(d.placeholderMouseMon);d.el.removeCls(c);a=d.getPosition(true);if(d.collapseTool){d.collapseTool.el.show()}}d.placeholder.hidden=true;d.placeholder.el.hide();d.collapsed=false;d.show();if(b){if(a){e=d.el.getXY();d.el.setLeftTop(a[0],a[1]);d.el.removeCls(c);d.el.moveTo(e[0],e[1],{duration:Ext.Number.from(b,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.fireEvent("expand",d)}}})}else{d.hidden=true;d.el.hide();d.collapsed=h;d.placeholder.show();g=h.substr(0,1);d.hidden=false;d.el.slideIn(g,{duration:Ext.Number.from(b,Ext.fx.Anim.prototype.duration),listeners:{afteranimate:function(){d.collapsed=false;d.placeholder.hide();d.fireEvent("expand",d)}}})}}else{d.fireEvent("expand",d)}},afterExpand:function(b){var a=this,c=a.ownerLayout;a.isCollapsingOrExpanding=false;if(a.collapseTool){a.collapseTool.setType("collapse-"+a.collapseDirection)}if(c&&b){c.onContentChange(a)}a.fireEvent("expand",a)},setBorder:function(a,c){if(c){return}var b=this,d=b.header;if(!a){a=0}else{a=Ext.Element.unitizeBox((a===true)?1:a)}if(d){if(d.isHeader){d.setBorder(a)}else{d.border=a}}if(b.rendered&&b.bodyBorder!==false){b.body.setStyle("border-width",a)}b.updateLayout();b.border=a},toggleCollapse:function(){var a=this;if(a.isCollapsingOrExpanding){return a}if(a.collapsed){a.expand(a.animCollapse)}else{a.collapse(a.collapseDirection,a.animCollapse)}return a},getKeyMap:function(){return this.keyMap||(this.keyMap=new Ext.util.KeyMap(this.el,this.keys))},initDraggable:function(){this.dd=new Ext.panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var b=[],c=this.header,a=c?c.query("tool[hidden=false]"):[];if(a.length){Ext.Array.forEach(a,function(d){b.push({type:d.type})})}else{b=[{type:"placeholder"}]}return b},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox(),e;if(!b){b=new Ext.panel.Panel({renderTo:document.body,floating:{shadow:false},frame:Ext.supports.CSS3BorderRadius?d.frame:false,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,baseCls:d.baseCls,cls:d.baseCls+"-ghost "+(a||"")});d.ghostPanel=b}b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle("zIndex"),0))}else{b.toFront()}if(!d.preventHeader){e=b.header;if(e){e.suspendLayouts();Ext.Array.forEach(e.query("tool"),function(g){e.remove(g)});e.resumeLayouts()}b.addTool(d.ghostTools());b.setTitle(d.title);b.setIconCls(d.iconCls)}b.el.show();b.setPagePosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();if(d.floatingItems){d.floatingItems.hide()}return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){if(a!==false){c.setPagePosition(c.ghostPanel.el.getXY());if(c.hideMode=="offsets"){delete c.el.hideModeStyles}}c.el.show();if(c.floatingItems){c.floatingItems.show()}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide()},initResizable:function(a){if(this.collapsed){a.disabled=true}this.callParent([a])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define("Ext.container.ButtonGroup",{extend:"Ext.panel.Panel",alias:"widget.buttongroup",alternateClassName:"Ext.ButtonGroup",baseCls:Ext.baseCSSPrefix+"btn-group",layout:{type:"table"},defaultType:"button",frame:true,frameHeader:false,internalDefaults:{removeMode:"container",hideParent:true},initComponent:function(){var a=this,b=a.columns;a.noTitleCls=a.baseCls+"-notitle";if(b){a.layout=Ext.apply({},{columns:b},a.layout)}if(!a.title){a.addCls(a.noTitleCls)}a.callParent(arguments)},beforeRender:function(){var a=this;a.callParent();if(a.header){delete a.header.items.items[0].flex;a.header.insert(1,{xtype:"component",ui:a.ui,flex:1});a.header.insert(0,{xtype:"component",ui:a.ui,flex:1})}a.callParent(arguments)},onBeforeAdd:function(a){if(a.is("button")){a.ui=a.ui+"-toolbar"}this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b}});Ext.define("Ext.panel.Table",{extend:"Ext.panel.Panel",alias:"widget.tablepanel",uses:["Ext.selection.RowModel","Ext.grid.PagingScroller","Ext.grid.header.Container","Ext.grid.Lockable"],extraBaseCls:Ext.baseCSSPrefix+"grid",extraBodyCls:Ext.baseCSSPrefix+"grid-body",layout:"fit",hasView:false,viewType:null,selType:"rowmodel",scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,scrollerOwner:true,enableColumnMove:true,restrictColumnReorder:false,enableColumnResize:true,enableColumnHide:true,rowLines:true,initComponent:function(){var h=this,k=h.scroll,b=false,a=false,g=h.columns||h.colModel,j,c=h.border;if(h.hideHeaders){c=false}if(h.columnLines){h.addCls(Ext.baseCSSPrefix+"grid-with-col-lines")}if(h.rowLines){h.addCls(Ext.baseCSSPrefix+"grid-with-row-lines")}h.store=Ext.data.StoreManager.lookup(h.store||"ext-empty-store");if(g instanceof Ext.grid.header.Container){h.headerCt=g;h.headerCt.border=c;h.columns=h.headerCt.items.items}else{if(Ext.isArray(g)){g={items:g,border:c}}Ext.apply(g,{forceFit:h.forceFit,sortable:h.sortableColumns,enableColumnMove:h.enableColumnMove,enableColumnResize:h.enableColumnResize,enableColumnHide:h.enableColumnHide,border:c,restrictReorder:h.restrictColumnReorder});h.columns=g.items;if(h.enableLocking||Ext.ComponentQuery.query("{locked !== undefined}{processed != true}",h.columns).length){h.self.mixin("lockable",Ext.grid.Lockable);h.injectLockable()}}h.addEvents("reconfigure","viewready");h.bodyCls=h.bodyCls||"";h.bodyCls+=(" "+h.extraBodyCls);h.cls=h.cls||"";h.cls+=(" "+h.extraBaseCls);delete h.autoScroll;if(!h.hasView){if(!h.headerCt){h.headerCt=new Ext.grid.header.Container(g)}h.columns=h.headerCt.items.items;if(h.store.buffered&&!h.store.remoteSort){for(var d=0,e=h.columns.length;d<e;d++){h.columns[d].sortable=false}}if(h.hideHeaders){h.headerCt.height=0;h.headerCt.border=false;h.headerCt.addCls(Ext.baseCSSPrefix+"grid-header-ct-hidden");h.addCls(Ext.baseCSSPrefix+"grid-header-hidden");if(Ext.isIEQuirks){h.headerCt.style={display:"none"}}}if(k===true||k==="both"){b=a=true}else{if(k==="horizontal"){a=true}else{if(k==="vertical"){b=true}}}h.relayHeaderCtEvents(h.headerCt);h.features=h.features||[];if(!Ext.isArray(h.features)){h.features=[h.features]}h.dockedItems=h.dockedItems||[];h.dockedItems.unshift(h.headerCt);h.viewConfig=h.viewConfig||{};if(h.store&&h.store.buffered){h.viewConfig.preserveScrollOnRefresh=true}else{if(h.invalidateScrollerOnRefresh!==undefined){h.viewConfig.preserveScrollOnRefresh=!h.invalidateScrollerOnRefresh}}j=h.getView();h.items=[j];h.hasView=true;if(b){if(h.store.buffered){h.verticalScroller=new Ext.grid.PagingScroller(Ext.apply({panel:h,store:h.store,view:h.view},h.verticalScroller))}}if(a){if(!h.hideHeaders){j.on({scroll:{fn:h.onHorizontalScroll,element:"el",scope:h}})}}h.mon(j.store,{load:h.onStoreLoad,scope:h});h.mon(j,{viewready:h.onViewReady,refresh:h.onViewRefresh,scope:h})}this.relayEvents(h.view,["beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","selectionchange","beforeselect","select","beforedeselect","deselect"]);h.callParent(arguments)},initStateEvents:function(){this.stateEvents=Ext.Array.merge(this.stateEvents,["columnresize","columnmove","columnhide","columnshow","sortchange"]);this.callParent()},relayHeaderCtEvents:function(a){this.relayEvents(a,["columnresize","columnmove","columnhide","columnshow","sortchange"])},getState:function(){var a=this,b=a.callParent(),c=a.store.sorters.first();b=a.addPropertyToState(b,"columns",(a.headerCt||a).getColumnsState());if(c){b=a.addPropertyToState(b,"sort",{property:c.property,direction:c.direction,root:c.root})}return b},applyState:function(d){var c=this,e=d.sort,a=c.store,b=d.columns;delete d.columns;c.callParent(arguments);if(b){(c.headerCt||c).applyColumnsState(b)}if(e){if(a.remoteSort){a.sort({property:e.property,direction:e.direction,root:e.root},null,false)}else{a.sort(e.property,e.direction)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();a.view=Ext.widget(Ext.apply({},a.viewConfig,{deferInitialRefresh:a.deferRowRender!==false,scroll:a.scroll,xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a}));a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,["cellclick","celldblclick"])}return a.view},setAutoScroll:Ext.emptyFn,processEvent:function(g,b,a,c,d,i){var h=this,j;if(d!==-1){j=h.headerCt.getGridColumns()[d];return j.processEvent.apply(j,arguments)}},determineScrollbars:function(){},invalidateScroller:function(){},scrollByDeltaY:function(b,a){this.getView().scrollBy(0,b,a)},scrollByDeltaX:function(b,a){this.getView().scrollBy(b,0,a)},afterCollapse:function(){var a=this;a.saveScrollPos();a.saveScrollPos();a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);a.restoreScrollPos();a.restoreScrollPos()},saveScrollPos:Ext.emptyFn,restoreScrollPos:Ext.emptyFn,onHeaderMove:function(d,e,a,b,c){this.view.moveColumn(b,c,a)},onHeaderHide:function(a,b){},onHeaderShow:function(a,b){},onViewReady:function(){this.fireEvent("viewready",this)},onViewRefresh:function(){if(this.store.getCount()&&!this.firstDataArrived&&this.headerCt.down("gridcolumn[flex]")||this.headerCt.down("gridcolumn[isGroupHeader]")){this.firstDataArrived=true;this.headerCt.updateLayout()}},setScrollTop:function(c){var b=this,a=b.getScrollerOwner();a.virtualScrollTop=c},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up("[scrollerOwner]")}return a},getLhsMarker:function(){var a=this;return a.lhsMarker||(a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getRhsMarker:function(){var a=this;return a.rhsMarker||(a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+"grid-resize-marker"},true))},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b="SINGLE",a;if(this.simpleSelect){b="SIMPLE"}else{if(this.multiSelect){b="MULTI"}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create("selection."+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,["selectionchange","beforeselect","beforedeselect","select","deselect"]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},onHorizontalScroll:function(d,e){var b=this.getScrollerOwner(),c=b.query("tableview"),a=c[1]||c[0];a.el.dom.scrollLeft=e.scrollLeft;this.headerCt.el.dom.scrollLeft=e.scrollLeft},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},beforeDestroy:function(){Ext.destroy(this.verticalScroller);this.callParent()},reconfigure:function(a,b){var c=this,d=c.headerCt;if(c.lockable){c.reconfigureLockable(a,b)}else{if(b){d.suspendLayouts();d.removeAll();d.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}if(b){d.resumeLayouts(true)}d.setSortState()}c.fireEvent("reconfigure",c,a,b)}});Ext.define("Ext.tab.Panel",{extend:"Ext.panel.Panel",alias:"widget.tabpanel",alternateClassName:["Ext.TabPanel"],requires:["Ext.layout.container.Card","Ext.tab.Bar"],tabPosition:"top",removePanelHeader:true,plain:false,itemCls:Ext.baseCSSPrefix+"tabpanel-child",minTabWidth:undefined,maxTabWidth:undefined,deferredRender:true,initComponent:function(){var c=this,b=[].concat(c.dockedItems||[]),a=c.activeTab||0;c.layout=new Ext.layout.container.Card(Ext.apply({owner:c,deferredRender:c.deferredRender,itemCls:c.itemCls},c.layout));c.tabBar=new Ext.tab.Bar(Ext.apply({},c.tabBar,{dock:c.tabPosition,plain:c.plain,border:c.border,cardLayout:c.layout,tabPanel:c}));b.push(c.tabBar);c.dockedItems=b;c.addEvents("beforetabchange","tabchange");c.callParent(arguments);c.setActiveTab(a);c.initialTabSet=true;c.on("afterlayout",c.afterInitialLayout,c,{single:true})},afterInitialLayout:function(){var b=this,a=b.getComponent(b.activeTab);if(a){b.layout.setActiveItem(a)}},setActiveTab:function(a){var c=this,b;a=c.getComponent(a);if(a){b=c.getActiveTab();if(b&&b!==a&&c.fireEvent("beforetabchange",c,a,b)===false){return false}c.tabBar.setActiveTab(a.tab);c.activeTab=a;if(c.rendered){c.layout.setActiveItem(a)}if(c.initialTabSet&&b!==a){c.fireEvent("tabchange",c,a,b)}}},getActiveTab:function(){return this.activeTab},getTabBar:function(){return this.tabBar},onAdd:function(e,c){var d=this,b=e.tabConfig||{},a={xtype:"tab",card:e,disabled:e.disabled,closable:e.closable,hidden:e.hidden&&!e.hiddenByLayout,tooltip:e.tooltip,tabBar:d.tabBar,closeText:e.closeText};b=Ext.applyIf(b,a);e.tab=d.tabBar.insert(c,b);e.on({scope:d,enable:d.onItemEnable,disable:d.onItemDisable,beforeshow:d.onItemBeforeShow,iconchange:d.onItemIconChange,iconclschange:d.onItemIconClsChange,titlechange:d.onItemTitleChange});if(e.isPanel){if(d.removePanelHeader){e.preventHeader=true;if(e.rendered){e.updateHeader()}}if(e.isPanel&&d.border){e.setBorder(false)}}},onItemEnable:function(a){a.tab.enable()},onItemDisable:function(a){a.tab.disable()},onItemBeforeShow:function(a){if(a!==this.activeTab){this.setActiveTab(a);return false}},onItemIconChange:function(b,a){b.tab.setIcon(a);this.getTabBar().updateLayout()},onItemIconClsChange:function(b,a){b.tab.setIconCls(a);this.getTabBar().updateLayout()},onItemTitleChange:function(a,b){a.tab.setText(b);this.getTabBar().updateLayout()},doRemove:function(d,b){var c=this,a=c.items,e=a.getCount()>1;if(c.destroying||!e){c.activeTab=null}else{if(d===c.activeTab){c.setActiveTab(d.next()||a.getAt(0))}}c.callParent(arguments);delete d.tab.card;delete d.tab},onRemove:function(c,a){var b=this;c.un({scope:b,enable:b.onItemEnable,disable:b.onItemDisable,beforeshow:b.onItemBeforeShow});if(!b.destroying&&c.tab.ownerCt==b.tabBar){b.tabBar.remove(c.tab)}}});Ext.define("Ext.tip.Tip",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Tip",minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",constrainPosition:true,frame:false,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+"tip",floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,closeAction:"hide",ariaRole:"tooltip",initComponent:function(){var a=this;a.floating=Ext.apply({},{shadow:a.shadow},a.self.prototype.floating);a.callParent(arguments);a.constrain=a.constrain||a.constrainPosition},showAt:function(b){var a=this;this.callParent(arguments);if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define("Ext.slider.Tip",{extend:"Ext.tip.Tip",minWidth:10,alias:"widget.slidertip",offsets:[0,-10],isSliderTip:true,init:function(b){var a=this;b.on({scope:a,dragstart:a.onSlide,drag:a.onSlide,dragend:a.hide,destroy:a.destroy})},onSlide:function(c,d,a){var b=this;b.show();b.update(b.getText(a));b.doComponentLayout();b.el.alignTo(a.el,"b-t?",b.offsets)},getText:function(a){return String(a.value)}});Ext.define("Ext.slider.Multi",{extend:"Ext.form.field.Base",alias:"widget.multislider",alternateClassName:"Ext.slider.MultiSlider",requires:["Ext.slider.Thumb","Ext.slider.Tip","Ext.Number","Ext.util.Format","Ext.Template","Ext.layout.component.field.Slider"],childEls:["endEl","innerEl"],fieldSubTpl:['<div id="{id}" class="'+Ext.baseCSSPrefix+'slider {fieldCls} {vertical}" aria-valuemin="{minValue}" aria-valuemax="{maxValue}" aria-valuenow="{value}" aria-valuetext="{value}">','<div id="{cmpId}-endEl" class="'+Ext.baseCSSPrefix+'slider-end" role="presentation">','<div id="{cmpId}-innerEl" class="'+Ext.baseCSSPrefix+'slider-inner" role="presentation">',"{%this.renderThumbs(out, values)%}","</div>","</div>","</div>",{renderThumbs:function(g,e){var j=e.$comp,h=0,c=j.thumbs,b=c.length,d,a;for(;h<b;h++){d=c[h];a=d.getElConfig();a.id=j.id+"-thumb-"+h;Ext.DomHelper.generateMarkup(a,g)}},disableFormats:true}],vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,dragging:false,constrainThumbs:true,componentLayout:"sliderfield",useTips:true,tipText:null,ariaRole:"slider",initValue:function(){var e=this,c=Ext.value,b=c(e.values,[c(e.value,c(e.minValue,0))]),d=0,a=b.length;e.originalValue=b;for(;d<a;d++){e.addThumb(b[d])}},initComponent:function(){var c=this,a,b;c.thumbs=[];c.keyIncrement=Math.max(c.increment,c.keyIncrement);c.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");c.callParent();if(c.useTips){a=c.tipText?{getText:c.tipText}:{};c.plugins=c.plugins||[];Ext.each(c.plugins,function(d){if(d.isSliderTip){b=true;return false}});if(!b){c.plugins.push(new Ext.slider.Tip(a))}}},addThumb:function(c){var b=this,a=new Ext.slider.Thumb({ownerCt:b,ownerLayout:b.getComponentLayout(),value:c,slider:b,index:b.thumbs.length,constrain:b.constrainThumbs});b.thumbs.push(a);if(b.rendered){a.render()}return a},promoteThumb:function(c){var a=this.thumbs,e=a.length,g,b,d;for(d=0;d<e;d++){b=a[d];if(b==c){b.bringToFront()}else{b.sendToBack()}}},getSubTplData:function(){var a=this;return Ext.apply(a.callParent(),{$comp:a,vertical:a.vertical?Ext.baseCSSPrefix+"slider-vert":Ext.baseCSSPrefix+"slider-horz",minValue:a.minValue,maxValue:a.maxValue,value:a.value})},onRender:function(){var e=this,b=e.thumbs,a=b.length,d=0,c;e.callParent(arguments);for(d=0;d<a;d++){c=b[d];c.el=e.el.getById(e.id+"-thumb-"+d);c.onRender()}},initEvents:function(){var a=this;a.mon(a.el,{scope:a,mousedown:a.onMouseDown,keydown:a.onKeyDown})},getTrackpoint:function(g){var e=this,b,d,c=e.innerEl,a;if(e.vertical){d="top",a=c.getHeight()}else{d="left",a=c.getWidth()}b=c.translatePoints(g)[d];if(b>=0&&b<=a){return e.vertical?a-b:b}},onMouseDown:function(j){var d=this,h=false,c=0,b=d.thumbs,a=b.length,g;if(d.disabled){return}for(;c<a;c++){h=h||j.target==b[c].el.dom}if(d.clickToChange&&!h){g=d.getTrackpoint(j.getXY());if(g!==undefined){d.onClickChange(g)}}d.focus()},onClickChange:function(d){var c=this,a,b;a=c.getNearest(d);if(!a.disabled){b=a.index;c.setValue(b,Ext.util.Format.round(c.reversePixelValue(d),c.decimalPrecision),undefined,true)}},getNearest:function(j){var k=this,g=k.reversePixelValue(j),l=(k.maxValue-k.minValue)+5,b=null,e=k.thumbs,c=0,d=e.length,a,m,h;for(;c<d;c++){a=k.thumbs[c];m=a.value;h=Math.abs(m-g);if(Math.abs(h<=l)){b=a;l=h}}return b},onKeyDown:function(c){var b=this,a,d;if(b.disabled||b.thumbs.length!==1){c.preventDefault();return}a=c.getKey();switch(a){case c.UP:case c.RIGHT:c.stopEvent();d=c.ctrlKey?b.maxValue:b.getValue(0)+b.keyIncrement;b.setValue(0,d,undefined,true);break;case c.DOWN:case c.LEFT:c.stopEvent();d=c.ctrlKey?b.minValue:b.getValue(0)-b.keyIncrement;b.setValue(0,d,undefined,true);break;default:c.preventDefault()}},normalizeValue:function(a){var b=this;a=Ext.Number.snap(a,this.increment,this.minValue,this.maxValue);a=Ext.util.Format.round(a,b.decimalPrecision);a=Ext.Number.constrain(a,b.minValue,b.maxValue);return a},setMinValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.minValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemin",g)}for(;d<a;++d){c=b[d];c.value=c.value<g?g:c.value}e.syncThumbs()},setMaxValue:function(g){var e=this,d=0,b=e.thumbs,a=b.length,c;e.maxValue=g;if(e.rendered){e.inputEl.dom.setAttribute("aria-valuemax",g)}for(;d<a;++d){c=b[d];c.value=c.value>g?g:c.value}e.syncThumbs()},setValue:function(c,g,b,e){var d=this,a=d.thumbs[c];g=d.normalizeValue(g);if(g!==a.value&&d.fireEvent("beforechange",d,g,a.value,a)!==false){a.value=g;if(d.rendered){d.inputEl.set({"aria-valuenow":g,"aria-valuetext":g});a.move(d.calculateThumbPosition(g),Ext.isDefined(b)?b!==false:d.animate);d.fireEvent("change",d,g,a);if(e){d.fireEvent("changecomplete",d,g,a)}}}},calculateThumbPosition:function(a){return(a-this.minValue)/(this.maxValue-this.minValue)*100},getRatio:function(){var b=this,a=this.vertical?this.innerEl.getHeight():this.innerEl.getWidth(),c=this.maxValue-this.minValue;return c===0?a:(a/c)},reversePixelValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},reversePercentageValue:function(a){return this.minValue+(this.maxValue-this.minValue)*(a/100)},onDisable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e,h;g.callParent();for(;d<a;d++){c=b[d];e=c.el;c.disable();if(Ext.isIE){h=e.getXY();e.hide();g.innerEl.addCls(g.disabledCls).dom.disabled=true;if(!g.thumbHolder){g.thumbHolder=g.endEl.createChild({cls:Ext.baseCSSPrefix+"slider-thumb "+g.disabledCls})}g.thumbHolder.show().setXY(h)}}},onEnable:function(){var g=this,d=0,b=g.thumbs,a=b.length,c,e;this.callParent();for(;d<a;d++){c=b[d];e=c.el;c.enable();if(Ext.isIE){g.innerEl.removeCls(g.disabledCls).dom.disabled=false;if(g.thumbHolder){g.thumbHolder.hide()}e.show();g.syncThumbs()}}},syncThumbs:function(){if(this.rendered){var a=this.thumbs,c=a.length,b=0;for(;b<c;b++){a[b].move(this.calculateThumbPosition(a[b].value))}}},getValue:function(a){return Ext.isNumber(a)?this.thumbs[a].value:this.getValues()},getValues:function(){var c=[],d=0,b=this.thumbs,a=b.length;for(;d<a;d++){c.push(b[d].value)}return c},getSubmitValue:function(){var a=this;return(a.disabled||!a.submitValue)?null:a.getValue()},reset:function(){var b=this,a=Ext.Array;a.forEach(a.from(b.originalValue),function(d,c){b.setValue(c,d)});b.clearInvalid();delete b.wasValid},beforeDestroy:function(){var a=this;Ext.destroy(a.innerEl,a.endEl,a.focusEl);Ext.each(a.thumbs,function(b){Ext.destroy(b)},a);a.callParent()}});Ext.define("Ext.slider.Single",{extend:"Ext.slider.Multi",alias:["widget.slider","widget.sliderfield"],alternateClassName:["Ext.Slider","Ext.form.SliderField","Ext.slider.SingleSlider","Ext.slider.Slider"],getValue:function(){return this.callParent([0])},setValue:function(d,b){var c=arguments,a=c.length;if(a==1||(a<=3&&typeof c[1]!="number")){c=Ext.toArray(c);c.unshift(0)}return this.callParent(c)},getNearest:function(){return this.thumbs[0]}});Ext.define("Ext.tip.ToolTip",{extend:"Ext.tip.Tip",alias:"widget.tooltip",alternateClassName:"Ext.ToolTip",showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+"tip-anchor "+c.anchorCls})},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,"mouseover",b.onTargetOver,b);b.mun(c,"mouseout",b.onTargetOut,b);b.mun(c,"mousemove",b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&&b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.getScopeParent())}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&&b.isVisible())&&b.autoHide!==false){b.hide()}}},getTargetXY:function(){var j=this,d;if(j.delegate){j.anchorTarget=j.triggerElement}if(j.anchor){j.targetCounter++;var c=j.getOffsets(),n=(j.anchorToTarget&&!j.trackMouse)?j.el.getAlignToXY(j.anchorTarget,j.getAnchorAlign()):j.targetXY,a=Ext.Element.getViewWidth()-5,i=Ext.Element.getViewHeight()-5,l=document.documentElement,e=document.body,m=(l.scrollLeft||e.scrollLeft||0)+5,k=(l.scrollTop||e.scrollTop||0)+5,b=[n[0]+c[0],n[1]+c[1]],h=j.getSize(),g=j.constrainPosition;j.anchorEl.removeCls(j.anchorCls);if(j.targetCounter<2&&g){if(b[0]<m){if(j.anchorToTarget){j.defaultAlign="l-r";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="left";return j.getTargetXY()}if(b[0]+h.width>a){if(j.anchorToTarget){j.defaultAlign="r-l";if(j.mouseOffset){j.mouseOffset[0]*=-1}}j.anchor="right";return j.getTargetXY()}if(b[1]<k){if(j.anchorToTarget){j.defaultAlign="t-b";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="top";return j.getTargetXY()}if(b[1]+h.height>i){if(j.anchorToTarget){j.defaultAlign="b-t";if(j.mouseOffset){j.mouseOffset[1]*=-1}}j.anchor="bottom";return j.getTargetXY()}}j.anchorCls=Ext.baseCSSPrefix+"tip-anchor-"+j.getAnchorPosition();j.anchorEl.addCls(j.anchorCls);j.targetCounter=0;return b}else{d=j.getMouseOffset();return(j.targetXY)?[j.targetXY[0]+d[0],j.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&&!c.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-c.anchorOffset,30];break;case"b":b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case"r":b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer("hide");b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&&!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)<a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.show,a.showDelay,a)}}else{if(!a.hidden&&a.autoHide!==false){a.show()}}},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer("show");if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&&!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer("dismiss");a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}a.showAt(a.getTargetXY());if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true);a.el.sync(true);if(a.dismissDelay&&a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}}},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case"t":a="b";b="tl";d=[20+c.anchorOffset,1];break;case"r":a="l";b="tr";d=[-1,12+c.anchorOffset];break;case"b":a="t";b="bl";d=[20+c.anchorOffset,-1];break;default:a="r";b="tl";d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+"-"+b,d);c.anchorEl.setStyle("z-index",parseInt(c.el.getZIndex(),10)||0+1).setVisibilityMode(Ext.Element.DISPLAY)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+"Timer";clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer("show");a.clearTimer("dismiss");a.clearTimer("hide")},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),"mousedown",a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(a.autoHide!==true&&!a.closable&&!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);this.callParent()}});Ext.define("Ext.chart.Tip",{requires:["Ext.tip.ToolTip","Ext.chart.TipSurface"],constructor:function(b){var c=this,a,d,e;if(b.tips){c.tipTimeout=null;c.tipConfig=Ext.apply({},b.tips,{renderer:Ext.emptyFn,constrainPosition:true,autoHide:true});c.tooltip=new Ext.tip.ToolTip(c.tipConfig);c.chart.surface.on("mousemove",c.tooltip.onMouseMove,c.tooltip);c.chart.surface.on("mouseleave",function(){c.hideTip()});if(c.tipConfig.surface){a=c.tipConfig.surface;d=a.sprites;e=new Ext.chart.TipSurface({id:"tipSurfaceComponent",sprites:d});if(a.width&&a.height){e.setSize(a.width,a.height)}c.tooltip.add(e);c.spriteTip=e}}},showTip:function(l){var e=this;if(!e.tooltip){return}clearTimeout(e.tipTimeout);var m=e.tooltip,a=e.spriteTip,c=e.tipConfig,d=m.trackMouse,k,b,j,h,i,g;if(!d){m.trackMouse=true;k=l.sprite;b=k.surface;j=Ext.get(b.getId());if(j){h=j.getXY();i=h[0]+(k.attr.x||0)+(k.attr.translation&&k.attr.translation.x||0);g=h[1]+(k.attr.y||0)+(k.attr.translation&&k.attr.translation.y||0);m.targetXY=[i,g]}}if(a){c.renderer.call(m,l.storeItem,l,a.surface)}else{c.renderer.call(m,l.storeItem,l)}m.show();m.trackMouse=d},hideTip:function(a){var b=this.tooltip;if(!b){return}clearTimeout(this.tipTimeout);this.tipTimeout=setTimeout(function(){b.hide()},0)}});Ext.define("Ext.chart.series.Series",{mixins:{observable:"Ext.util.Observable",labels:"Ext.chart.Label",highlights:"Ext.chart.Highlight",tips:"Ext.chart.Tip",callouts:"Ext.chart.Callout"},type:null,title:null,showInLegend:true,renderer:function(e,a,c,d,b){return c},shadowAttributes:null,triggerAfterDraw:false,constructor:function(a){var b=this;if(a){Ext.apply(b,a)}b.shadowGroups=[];b.mixins.labels.constructor.call(b,a);b.mixins.highlights.constructor.call(b,a);b.mixins.tips.constructor.call(b,a);b.mixins.callouts.constructor.call(b,a);b.addEvents({scope:b,itemmouseover:true,itemmouseout:true,itemmousedown:true,itemmouseup:true,mouseleave:true,afterdraw:true,titlechange:true});b.mixins.observable.constructor.call(b,a);b.on({scope:b,itemmouseover:b.onItemMouseOver,itemmouseout:b.onItemMouseOut,mouseleave:b.onMouseLeave})},eachRecord:function(c,b){var a=this.chart;(a.substore||a.store).each(c,b)},getRecordCount:function(){var b=this.chart,a=b.substore||b.store;return a?a.getCount():0},isExcluded:function(a){var b=this.__excludes;return !!(b&&b[a])},setBBox:function(a){var e=this,c=e.chart,b=c.chartBBox,g=a?0:c.maxGutter[0],d=a?0:c.maxGutter[1],h,i;h={x:b.x,y:b.y,width:b.width,height:b.height};e.clipBox=h;i={x:(h.x+g)-(c.zoom.x*c.zoom.width),y:(h.y+d)-(c.zoom.y*c.zoom.height),width:(h.width-(g*2))*c.zoom.width,height:(h.height-(d*2))*c.zoom.height};e.bbox=i},onAnimate:function(b,a){var c=this;b.stopAnimation();if(c.triggerAfterDraw){return b.animate(Ext.applyIf(a,c.chart.animate))}else{c.triggerAfterDraw=true;return b.animate(Ext.apply(Ext.applyIf(a,c.chart.animate),{listeners:{afteranimate:function(){c.triggerAfterDraw=false;c.fireEvent("afterrender")}}}))}},getGutters:function(){return[0,0]},onItemMouseOver:function(b){var a=this;if(b.series===a){if(a.highlight){a.highlightItem(b)}if(a.tooltip){a.showTip(b)}}},onItemMouseOut:function(b){var a=this;if(b.series===a){a.unHighlightItem();if(a.tooltip){a.hideTip(b)}}},onMouseLeave:function(){var a=this;a.unHighlightItem();if(a.tooltip){a.hideTip()}},getItemForPoint:function(a,j){if(!this.items||!this.items.length||this.seriesIsHidden){return null}var g=this,b=g.items,h=g.bbox,e,c,d;if(!Ext.draw.Draw.withinBox(a,j,h)){return null}for(c=0,d=b.length;c<d;c++){if(b[c]&&this.isItemInPoint(a,j,b[c],c)){return b[c]}}return null},isItemInPoint:function(a,d,c,b){return false},hideAll:function(){var h=this,g=h.items,m,e,d,c,a,k,b;h.seriesIsHidden=true;h._prevShowMarkers=h.showMarkers;h.showMarkers=false;h.hideLabels(0);for(d=0,e=g.length;d<e;d++){m=g[d];k=m.sprite;if(k){k.setAttributes({hidden:true},true)}if(k&&k.shadows){b=k.shadows;for(c=0,a=b.length;c<a;++c){b[c].setAttributes({hidden:true},true)}}}},showAll:function(){var a=this,b=a.chart.animate;a.chart.animate=false;a.seriesIsHidden=false;a.showMarkers=a._prevShowMarkers;a.drawSeries();a.chart.animate=b},hide:function(){if(this.items){var h=this,b=h.items,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d].sprite){b[d].sprite.hide(true);e=b[d].shadows||b[d].sprite.shadows;if(e){for(c=0,a=e.length;c<a;++c){e[c].hide(true)}}}}h.hideLabels()}}},getLegendColor:function(a){var b=this,d,c;if(b.seriesStyle){d=b.seriesStyle.fill;c=b.seriesStyle.stroke;if(d&&d!="none"){return d}if(c){return c}}return(b.colorArrayStyle)?b.colorArrayStyle[b.seriesIdx%b.colorArrayStyle.length]:"#000"},visibleInLegend:function(a){var b=this.__excludes;if(b){return !b[a]}return !this.seriesIsHidden},setTitle:function(a,d){var c=this,b=c.title;if(Ext.isString(a)){d=a;a=0}if(Ext.isArray(b)){b[a]=d}else{c.title=d}c.fireEvent("titlechange",d,a)}});Ext.define("Ext.chart.series.Cartesian",{extend:"Ext.chart.series.Series",alternateClassName:["Ext.chart.CartesianSeries","Ext.chart.CartesianChart"],xField:null,yField:null,axis:"left",getLegendLabels:function(){var b=this,c=[],a=b.combinations;Ext.each([].concat(b.yField),function(e,d){var g=b.title;c.push((Ext.isArray(g)?g[d]:g)||e)});if(a){Ext.each(a,function(e){var d=c[e[0]],g=c[e[1]];c[e[1]]=d+" & "+g;c.splice(e[0],1)})}return c},eachYValue:function(a,c,b){Ext.each(this.getYValueAccessors(),function(d,e){c.call(b,d(a),e)})},getYValueCount:function(){return this.getYValueAccessors().length},combine:function(g,e){var d=this,c=d.getYValueAccessors(),b=c[g],a=c[e];c[e]=function(h){return b(h)+a(h)};c.splice(g,1);d.callParent([g,e])},clearCombinations:function(){delete this.yValueAccessors;this.callParent()},getYValueAccessors:function(){var b=this,a=b.yValueAccessors;if(!a){a=b.yValueAccessors=[];Ext.each([].concat(b.yField),function(c){a.push(function(d){return d.get(c)})})}return a},getMinMaxXValues:function(){var d=this,b,a,c=d.xField;if(d.getRecordCount()>0){b=Infinity;a=-b;d.eachRecord(function(e){var g=e.get(c);if(g>a){a=g}if(g<b){b=g}})}else{b=a=0}return[b,a]},getMinMaxYValues:function(){var i=this,g=i.stacked,e,c,d,b;function h(k,j){if(!i.isExcluded(j)){if(k<0){b+=k}else{d+=k}}}function a(k,j){if(!i.isExcluded(j)){if(k>c){c=k}if(k<e){e=k}}}if(i.getRecordCount()>0){e=Infinity;c=-e;i.eachRecord(function(j){if(g){d=0;b=0;i.eachYValue(j,h);if(d>c){c=d}if(b<e){e=b}}else{i.eachYValue(j,a)}})}else{e=c=0}return[e,c]},getAxesForXAndYFields:function(){var c=this,e=c.chart.axes,b=[].concat(c.axis),d,a;if(Ext.Array.indexOf(b,"top")>-1){d="top"}else{if(Ext.Array.indexOf(b,"bottom")>-1){d="bottom"}else{if(e.get("top")){d="top"}else{if(e.get("bottom")){d="bottom"}}}}if(Ext.Array.indexOf(b,"left")>-1){a="left"}else{if(Ext.Array.indexOf(b,"right")>-1){a="right"}else{if(e.get("left")){a="left"}else{if(e.get("right")){a="right"}}}}return{xAxis:d,yAxis:a}}});Ext.define("Ext.chart.series.Area",{extend:"Ext.chart.series.Cartesian",alias:"series.area",requires:["Ext.chart.axis.Axis","Ext.draw.Color","Ext.fx.Anim"],type:"area",stacked:true,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;c.highlightCfg=Ext.Object.merge({},{lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{__excludes:[]});if(e.highlight){e.highlightSprite=a.add({type:"path",path:["M",0,0],zIndex:1000,opacity:0.3,lineWidth:5,hidden:true,stroke:"#444"})}e.group=a.getGroup(e.seriesId)},shrink:function(b,n,o){var k=b.length,m=Math.floor(k/o),h,g,d=0,l=this.areas.length,a=[],e=[],c=[];for(g=0;g<l;++g){a[g]=0}for(h=0;h<k;++h){d+=b[h];for(g=0;g<l;++g){a[g]+=n[h][g]}if(h%m==0){e.push(d/m);for(g=0;g<l;++g){a[g]/=m}c.push(a);d=0;for(g=0,a=[];g<l;++g){a[g]=0}}}return{x:e,y:c}},getBounds:function(){var x=this,m=x.chart,i=m.getChartStore(),h=[].concat(x.yField),z=h.length,p=[],e=[],y=Infinity,v=y,t=y,u=-y,s=-y,d=Math,w=d.min,C=d.max,a,B,c,n,q,A,k,j,g,l,r,b,o;x.setBBox();a=x.bbox;if(x.axis){b=m.axes.get(x.axis);if(b){o=b.calcEnds();t=o.from||b.prevMin;s=C(o.to||b.prevMax,0)}}if(x.yField&&!Ext.isNumber(t)){b=new Ext.chart.axis.Axis({chart:m,fields:[].concat(x.yField)});o=b.calcEnds();t=o.from||b.prevMin;s=C(o.to||b.prevMax,0)}if(!Ext.isNumber(t)){t=0}if(!Ext.isNumber(s)){s=0}i.each(function(D,E){n=D.get(x.xField);q=[];if(typeof n!="number"){n=E}p.push(n);k=0;for(A=0;A<z;A++){if(x.__excludes[A]){continue}r=D.get(h[A]);if(typeof r=="number"){t=w(t,r);q.push(r);k+=r}}v=w(v,n);u=C(u,n);s=C(s,k);e.push(q)},x);B=a.width/((u-v)||1);c=a.height/((s-t)||1);j=p.length;if((j>a.width)&&x.areas){g=x.shrink(p,e,a.width);p=g.x;e=g.y}return{bbox:a,minX:v,minY:t,xValues:p,yValues:e,xScale:B,yScale:c,areasLen:z}},getPaths:function(){var w=this,m=w.chart,c=m.getChartStore(),e=true,g=w.getBounds(),a=g.bbox,n=w.items=[],v=[],b,d=0,p=[],s,j,k,h,q,t,l,z,r,u,o;j=g.xValues.length;for(s=0;s<j;s++){q=g.xValues[s];t=g.yValues[s];k=a.x+(q-g.minX)*g.xScale;l=0;d=0;for(z=0;z<g.areasLen;z++){if(w.__excludes[z]){continue}if(!v[z]){v[z]=[]}u=t[d];l+=u;h=a.y+a.height-(l-g.minY)*g.yScale;if(!p[z]){p[z]=["M",k,h];v[z].push(["L",k,h])}else{p[z].push("L",k,h);v[z].push(["L",k,h])}if(!n[z]){n[z]={pointsUp:[],pointsDown:[],series:w}}n[z].pointsUp.push([k,h]);d++}}for(z=0;z<g.areasLen;z++){if(w.__excludes[z]){continue}o=p[z];if(z==0||e){e=false;o.push("L",k,a.y+a.height,"L",a.x,a.y+a.height,"Z")}else{b=v[r];b.reverse();o.push("L",k,b[0][2]);for(s=0;s<j;s++){o.push(b[s][0],b[s][1],b[s][2]);n[z].pointsDown[j-s-1]=[b[s][1],b[s][2]]}o.push("L",a.x,o[2],"Z")}r=z}return{paths:p,areasLen:g.areasLen}},drawSeries:function(){var h=this,g=h.chart,i=g.getChartStore(),c=g.surface,b=g.animate,k=h.group,a=Ext.apply(h.seriesStyle,h.style),l=h.colorArrayStyle,o=l&&l.length||0,d,e,n,m,j;h.unHighlightItem();h.cleanHighlights();if(!i||!i.getCount()||h.seriesIsHidden){h.hide();h.items=[];return}n=h.getPaths();if(!h.areas){h.areas=[]}for(d=0;d<n.areasLen;d++){if(h.__excludes[d]){continue}if(!h.areas[d]){h.items[d].sprite=h.areas[d]=c.add(Ext.apply({},{type:"path",group:k,path:n.paths[d],stroke:a.stroke||l[d%o],fill:l[d%o]},a||{}))}e=h.areas[d];m=n.paths[d];if(b){j=h.renderer(e,false,{path:m,fill:l[d%o],stroke:a.stroke||l[d%o]},d,i);h.animation=h.onAnimate(e,{to:j})}else{j=h.renderer(e,false,{path:m,hidden:false,fill:l[d%o],stroke:a.stroke||l[d%o]},d,i);h.areas[d].setAttributes(j,true)}}h.renderLabels();h.renderCallouts()},onAnimate:function(b,a){b.show();return this.callParent(arguments)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,s,p,o,c,e){var u=this,l=u.chart,r=l.resizing,t=u.label,q=t.renderer,b=t.field,a=u.bbox,j=s.point[0],h=s.point[1],d,n,m;g.setAttributes({text:q(k.get(b[e])),hidden:true},true);d=g.getBBox();n=d.width/2;m=d.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h;if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},onPlaceCallout:function(m,r,J,G,F,d,k){var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=(G==0)?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=J.point,A,g,N,K,o,q,b=m.label.getBBox(),I=30,C=10,B=3,h,e,j,w,u,E=M.clipRect,n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);m.box.setAttributes({x:h,y:e,width:j,height:w},true);m.label.setAttributes({x:n+(N[0]>0?B:-(b.width+B)),y:l},true);for(u in m){m[u].show(true)}},isItemInPoint:function(j,h,m,c){var g=this,b=m.pointsUp,d=m.pointsDown,q=Math.abs,o=false,l=false,e=Infinity,a,n,k;for(a=0,n=b.length;a<n;a++){k=[b[a][0],b[a][1]];o=false;l=a==n-1;if(e>q(j-k[0])){e=q(j-k[0]);o=true;if(l){++a}}if(!o||(o&&l)){k=b[a-1];if(h>=k[1]&&(!d.length||h<=(d[a-1][1]))){m.storeIndex=a-1;m.storeField=g.yField[c];m.storeItem=g.chart.store.getAt(a-1);m._points=d.length?[k,d[a-1]]:[k];return true}else{break}}}return false},highlightSeries:function(){var a,c,b;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}a.__highlighted=true;a.__prevOpacity=a.__prevOpacity||a.attr.opacity||1;a.__prevFill=a.__prevFill||a.attr.fill;a.__prevLineWidth=a.__prevLineWidth||a.attr.lineWidth;b=Ext.draw.Color.fromString(a.__prevFill);c={lineWidth:(a.__prevLineWidth||0)+2};if(b){c.fill=b.getLighter(0.2).toString()}else{c.opacity=Math.max(a.__prevOpacity-0.3,0)}if(this.chart.animate){a.__highlightAnim=new Ext.fx.Anim(Ext.apply({target:a,to:c},this.chart.animate))}else{a.setAttributes(c,true)}}},unHighlightSeries:function(){var a;if(this._index!==undefined){a=this.areas[this._index];if(a.__highlightAnim){a.__highlightAnim.paused=true}if(a.__highlighted){a.__highlighted=false;a.__highlightAnim=new Ext.fx.Anim({target:a,to:{fill:a.__prevFill,opacity:a.__prevOpacity,lineWidth:a.__prevLineWidth}})}}},highlightItem:function(c){var b=this,a,d;if(!c){this.highlightSeries();return}a=c._points;d=a.length==2?["M",a[0][0],a[0][1],"L",a[1][0],a[1][1]]:["M",a[0][0],a[0][1],"L",a[0][0],b.bbox.y+b.bbox.height];b.highlightSprite.setAttributes({path:d,hidden:false},true)},unHighlightItem:function(a){if(!a){this.unHighlightSeries()}if(this.highlightSprite){this.highlightSprite.hide(true)}},hideAll:function(){var a=this;if(!isNaN(a._index)){a.__excludes[a._index]=true;a.areas[a._index].hide(true);a.redraw()}},showAll:function(){var a=this;if(!isNaN(a._index)){a.__excludes[a._index]=false;a.areas[a._index].show(true);a.redraw()}},redraw:function(){var a=this,b;b=a.chart.legend.rebuild;a.chart.legend.rebuild=false;a.chart.redraw();a.chart.legend.rebuild=b},hide:function(){if(this.areas){var h=this,b=h.areas,d,c,a,g,e;if(b&&b.length){for(d=0,g=b.length;d<g;++d){if(b[d]){b[d].hide(true)}}h.hideLabels()}}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Bar",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.BarSeries","Ext.chart.BarChart","Ext.chart.StackedBarChart"],requires:["Ext.chart.axis.Axis","Ext.fx.Anim"],type:"bar",alias:"series.bar",column:false,style:{},gutter:38.2,groupGutter:38.2,xPadding:0,yPadding:10,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({lineWidth:3,stroke:"#55c",opacity:0.8,color:"#f00"},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:1.2}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:0.9}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:0.6}}]});e.group=a.getGroup(e.seriesId+"-bars");if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBarGirth:function(){var d=this,a=d.chart.getChartStore(),b=d.column,c=a.getCount(),e=d.gutter/100;return(d.chart.chartBBox[b?"width":"height"]-d[b?"xPadding":"yPadding"]*2)/(c*(e+1)-e)},getGutters:function(){var b=this,a=b.column,c=Math.ceil(b[a?"xPadding":"yPadding"]+b.getBarGirth()/2);return b.column?[c,0]:[0,c]},getBounds:function(){var A=this,q=A.chart,k=q.getChartStore(),r=[].concat(A.yField),c=r.length,l=c,i=A.groupGutter/100,g=A.column,o=A.xPadding,b=A.yPadding,x=A.stacked,p=A.getBarGirth(),h=Math,D=h.max,v=h.abs,z,a,y,w,e,t,B,n,C,m,s,u,d;A.setBBox(true);a=A.bbox;if(A.__excludes){for(s=0,C=A.__excludes.length;s<C;s++){if(A.__excludes[s]){l--}}}if(A.axis){e=q.axes.get(A.axis);if(e){t=e.calcEnds();y=t.from;w=t.to}}if(A.yField&&!Ext.isNumber(y)){e=new Ext.chart.axis.Axis({chart:q,fields:[].concat(A.yField)});t=e.calcEnds();y=t.from;w=t.to}if(!Ext.isNumber(y)){y=0}if(!Ext.isNumber(w)){w=0}B=(g?a.height-b*2:a.width-o*2)/(w-y);z=p/((x?1:l)*(i+1)-i);n=(g)?a.y+a.height-b:a.x+o;if(x){C=[[],[]];k.each(function(j,E){C[0][E]=C[0][E]||0;C[1][E]=C[1][E]||0;for(s=0;s<c;s++){if(A.__excludes&&A.__excludes[s]){continue}m=j.get(r[s]);C[+(m>0)][E]+=v(m)}});C[+(w>0)].push(v(w));C[+(y>0)].push(v(y));d=D.apply(h,C[0]);u=D.apply(h,C[1]);B=(g?a.height-b*2:a.width-o*2)/(u+d);n=n+d*B*(g?-1:1)}else{if(y/w<0){n=n-y*B*(g?-1:1)}}return{bars:r,bbox:a,barsLen:c,groupBarsLen:l,barWidth:p,groupBarWidth:z,scale:B,zero:n,xPadding:o,yPadding:b,signed:y/w<0,minY:y,maxY:w}},getPaths:function(){var u=this,Q=u.chart,b=Q.getChartStore(),D=u.bounds=u.getBounds(),y=u.items=[],K=u.yField,k=u.gutter/100,c=u.groupGutter/100,O=Q.animate,I=u.column,w=u.group,l=Q.shadow,M=u.shadowGroups,L=u.shadowAttributes,p=M.length,x=D.bbox,m=u.xPadding,q=u.yPadding,N=u.stacked,v=D.barsLen,J=u.colorArrayStyle,h=J&&J.length||0,A=Math,n=A.max,F=A.min,t=A.abs,P,R,e,G,B,a,i,s,r,o,g,d,C,z,H,E;b.each(function(j,S,T){a=D.zero;i=D.zero;G=0;B=0;s=false;for(P=0,g=0;P<v;P++){if(u.__excludes&&u.__excludes[P]){continue}R=j.get(D.bars[P]);e=Math.round((R-n(D.minY,0))*D.scale);r={fill:J[(v>1?P:0)%h]};if(I){Ext.apply(r,{height:e,width:n(D.groupBarWidth,0),x:(x.x+m+S*D.barWidth*(1+k)+g*D.groupBarWidth*(1+c)*!N),y:a-e})}else{H=(T-1)-S;Ext.apply(r,{height:n(D.groupBarWidth,0),width:e+(a==D.zero),x:a+(a!=D.zero),y:(x.y+q+H*D.barWidth*(1+k)+g*D.groupBarWidth*(1+c)*!N+1)})}if(e<0){if(I){r.y=i;r.height=t(e)}else{r.x=i+e;r.width=t(e)}}if(N){if(e<0){i+=e*(I?-1:1)}else{a+=e*(I?-1:1)}G+=t(e);if(e<0){B+=t(e)}}r.x=Math.floor(r.x)+1;E=Math.floor(r.y);if(!Ext.isIE9&&r.y>E){E--}r.y=E;r.width=Math.floor(r.width);r.height=Math.floor(r.height);y.push({series:u,yField:K[P],storeItem:j,value:[j.get(u.xField),R],attr:r,point:I?[r.x+r.width/2,R>=0?r.y:r.y+r.height]:[R>=0?r.x+r.width:r.x,r.y+r.height/2]});if(O&&Q.resizing){o=I?{x:r.x,y:D.zero,width:r.width,height:0}:{x:D.zero,y:r.y,width:0,height:r.height};if(l&&(N&&!s||!N)){s=true;for(d=0;d<p;d++){C=M[d].getAt(N?S:(S*v+P));if(C){C.setAttributes(o,true)}}}z=w.getAt(S*v+P);if(z){z.setAttributes(o,true)}}g++}if(N&&y.length){y[S*g].totalDim=G;y[S*g].totalNegDim=B}},u)},renderShadows:function(u,v,y,l){var z=this,p=z.chart,s=p.surface,g=p.animate,x=z.stacked,a=z.shadowGroups,w=z.shadowAttributes,o=a.length,h=p.getChartStore(),d=z.column,r=z.items,b=[],m=l.zero,e,q,k,A,n,t,c;if((x&&(u%l.groupBarsLen===0))||!x){t=u/l.groupBarsLen;for(e=0;e<o;e++){q=Ext.apply({},w[e]);k=a[e].getAt(x?t:u);Ext.copyTo(q,v,"x,y,width,height");if(!k){k=s.add(Ext.apply({type:"rect",group:a[e]},Ext.apply({},y,q)))}if(x){A=r[u].totalDim;n=r[u].totalNegDim;if(d){q.y=m-n;q.height=A}else{q.x=m-n;q.width=A}}if(g){if(!x){c=z.renderer(k,h.getAt(t),q,u,h);z.onAnimate(k,{to:c})}else{c=z.renderer(k,h.getAt(t),Ext.apply(q,{hidden:true}),u,h);k.setAttributes(c,true)}}else{c=z.renderer(k,h.getAt(t),Ext.apply(q,{hidden:false}),u,h);k.setAttributes(c,true)}b.push(k)}}return b},drawSeries:function(){var C=this,r=C.chart,m=r.getChartStore(),v=r.surface,k=r.animate,A=C.stacked,d=C.column,b=r.shadow,a=C.shadowGroups,q=a.length,o=C.group,g=C.seriesStyle,s,p,y,x,B,t,c,e,h,n,l,z,u,w;if(!m||!m.getCount()||C.seriesIsHidden){C.hide();C.items=[];return}delete g.fill;l=Ext.apply(g,this.style);C.unHighlightItem();C.cleanHighlights();C.getPaths();n=C.bounds;s=C.items;B=d?{y:n.zero,height:0}:{x:n.zero,width:0};p=s.length;for(y=0;y<p;y++){t=o.getAt(y);z=s[y].attr;if(b){s[y].shadows=C.renderShadows(y,z,B,n)}if(!t){u=Ext.apply({},B,z);u=Ext.apply(u,l||{});t=v.add(Ext.apply({},{type:"rect",group:o},u))}if(k){c=C.renderer(t,m.getAt(y),z,y,m);t._to=c;w=C.onAnimate(t,{to:Ext.apply(c,l)});if(b&&A&&(y%n.barsLen===0)){x=y/n.barsLen;for(e=0;e<q;e++){w.on("afteranimate",function(){this.show(true)},a[e].getAt(x))}}}else{c=C.renderer(t,m.getAt(y),Ext.apply(z,{hidden:false}),y,m);t.setAttributes(Ext.apply(c,l),true)}s[y].sprite=t}p=o.getCount();for(x=y;x<p;x++){o.getAt(x).hide(true)}if(b){for(e=0;e<q;e++){h=a[e];p=h.getCount();for(x=y;x<p;x++){h.getAt(x).hide(true)}}}C.renderLabels()},onCreateLabel:function(e,l,d,g){var h=this,a=h.chart.surface,k=h.labelsGroup,b=h.label,c=Ext.apply({},b,h.seriesLabelStyle||{}),j;return a.add(Ext.apply({type:"text",group:k},c||{}))},onPlaceLabel:function(G,N,s,J,p,H,I,v){var m=this,n=m.bounds,d=n.groupBarWidth,F=m.column,L=m.chart,u=L.chartBBox,A=L.resizing,o=s.value[0],O=s.value[1],l=s.attr,z=m.label,K=z.orientation=="vertical",h=[].concat(z.field),t=z.renderer,r=t(N.get(h[v])),g=m.getLabelSize(r),a=g.width,c=g.height,b=n.zero,k="outside",q="insideStart",M="insideEnd",E=10,C=6,e=n.signed,D,B,w;G.setAttributes({text:r});G.isOutside=false;if(F){if(p==k){if(c+C+l.height>(O>=0?b-u.y:u.y+u.height-b)){p=M}}else{if(c+C>l.height){p=k;G.isOutside=true}}D=l.x+d/2;B=p==q?(b+((c/2+3)*(O>=0?-1:1))):(O>=0?(l.y+((c/2+3)*(p==k?-1:1))):(l.y+l.height+((c/2+3)*(p===k?1:-1))))}else{if(p==k){if(a+E+l.width>(O>=0?u.x+u.width-b:b-u.x)){p=M}}else{if(a+E>l.width){p=k;G.isOutside=true}}D=p==q?(b+((a/2+5)*(O>=0?1:-1))):(O>=0?(l.x+l.width+((a/2+5)*(p===k?1:-1))):(l.x+((a/2+5)*(p===k?-1:1))));B=l.y+d/2}w={x:D,y:B};if(K){w.rotate={x:D,y:B,degrees:270}}if(H&&A){if(F){D=l.x+l.width/2;B=b}else{D=b;B=l.y+l.height/2}G.setAttributes({x:D,y:B},true);if(K){G.setAttributes({rotate:{x:D,y:B,degrees:270}},true)}}if(H){m.onAnimate(G,{to:w})}else{G.setAttributes(Ext.apply(w,{hidden:false}),true)}},getLabelSize:function(g){var k=this.testerLabel,a=this.label,d=Ext.apply({},a,this.seriesLabelStyle||{}),b=a.orientation==="vertical",j,i,e,c;if(!k){k=this.testerLabel=this.chart.surface.add(Ext.apply({type:"text",opacity:0},d))}k.setAttributes({text:g},true);j=k.getBBox();i=j.width;e=j.height;return{width:b?e:i,height:b?i:e}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(a,d,b){var c=b.sprite.getBBox();return c.x<=a&&c.y<=d&&(c.x+c.width)>=a&&(c.y+c.height)>=d},hideAll:function(){var a=this.chart.axes;if(!isNaN(this._index)){if(!this.__excludes){this.__excludes=[]}this.__excludes[this._index]=true;this.drawSeries();a.each(function(b){b.drawAxis()})}},showAll:function(){var a=this.chart.axes;if(!isNaN(this._index)){if(!this.__excludes){this.__excludes=[]}this.__excludes[this._index]=false;this.drawSeries();a.each(function(b){b.drawAxis()})}},getLegendColor:function(a){var c=this,b=c.colorArrayStyle.length;if(c.style&&c.style.fill){return c.style.fill}else{return c.colorArrayStyle[a%b]}},highlightItem:function(a){this.callParent(arguments);this.renderLabels()},unHighlightItem:function(){this.callParent(arguments);this.renderLabels()},cleanHighlights:function(){this.callParent(arguments);this.renderLabels()}});Ext.define("Ext.chart.series.Column",{alternateClassName:["Ext.chart.ColumnSeries","Ext.chart.ColumnChart","Ext.chart.StackedColumnChart"],extend:"Ext.chart.series.Bar",type:"column",alias:"series.column",column:true,xPadding:10,yPadding:0});Ext.define("Ext.chart.series.Gauge",{extend:"Ext.chart.series.Series",type:"gauge",alias:"series.gauge",rad:Math.PI/180,highlightDuration:150,angleField:false,needle:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(i){return h.getSegment(i)}},initialize:function(){var b=this,a=b.chart.getChartStore();b.yField=[];if(b.label.field){a.each(function(c){b.yField.push(c.get(b.label.field))})}},getSegment:function(b){var C=this,B=C.rad,d=Math.cos,a=Math.sin,n=Math.abs,k=C.centerX,i=C.centerY,w=0,v=0,u=0,s=0,h=0,g=0,e=0,c=0,z=0.01,m=b.endRho-b.startRho,q=b.startAngle,p=b.endAngle,j=(q+p)/2*B,l=b.margin||0,t=n(p-q)>180,D=Math.min(q,p)*B,A=Math.max(q,p)*B,o=false;k+=l*d(j);i+=l*a(j);w=k+b.startRho*d(D);h=i+b.startRho*a(D);v=k+b.endRho*d(D);g=i+b.endRho*a(D);u=k+b.startRho*d(A);e=i+b.startRho*a(A);s=k+b.endRho*d(A);c=i+b.endRho*a(A);if(n(w-u)<=z&&n(h-e)<=z){o=true}if(o){return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["Z"]]}}else{return{path:[["M",w,h],["L",v,g],["A",b.endRho,b.endRho,0,+t,1,s,c],["L",u,e],["A",b.startRho,b.startRho,0,+t,0,w,h],["Z"]]}}},calcMiddle:function(p){var k=this,l=k.rad,o=p.slice,n=k.centerX,m=k.centerY,j=o.startAngle,e=o.endAngle,i=Math.max(("rho" in o)?o.rho:k.radius,k.label.minMargin),h=+k.donut,b=Math.min(j,e)*l,a=Math.max(j,e)*l,d=-(b+(a-b)/2),g=n+(p.endRho+p.startRho)/2*Math.cos(d),c=m-(p.endRho+p.startRho)/2*Math.sin(d);p.middle={x:g,y:c}},drawSeries:function(){var w=this,W=w.chart,b=W.getChartStore(),A=w.group,S=w.chart.animate,D=w.chart.axes.get(0),E=D&&D.minimum||w.minimum||0,I=D&&D.maximum||w.maximum||0,n=w.angleField||w.field||w.xField,M=W.surface,H=W.chartBBox,h=w.rad,c=+w.donut,X={},B=[],m=w.seriesStyle,a=w.seriesLabelStyle,g=w.colorArrayStyle,z=g&&g.length||0,K=W.maxGutter[0],J=W.maxGutter[1],k=Math.cos,s=Math.sin,t,e,d,v,r,C,O,F,G,L,U,T,l,V,x,o,Q,R,q,y,u,P,N;Ext.apply(m,w.style||{});w.setBBox();y=w.bbox;if(w.colorSet){g=w.colorSet;z=g.length}if(!b||!b.getCount()||w.seriesIsHidden){w.hide();w.items=[];return}e=w.centerX=H.x+(H.width/2);d=w.centerY=H.y+H.height;w.radius=Math.min(e-H.x,d-H.y);w.slices=r=[];w.items=B=[];if(!w.value){L=b.getAt(0);w.value=L.get(n)}O=w.value;if(w.needle){P={series:w,value:O,startAngle:-180,endAngle:0,rho:w.radius};u=-180*(1-(O-E)/(I-E));r.push(P)}else{u=-180*(1-(O-E)/(I-E));P={series:w,value:O,startAngle:-180,endAngle:u,rho:w.radius};N={series:w,value:w.maximum-O,startAngle:u,endAngle:0,rho:w.radius};r.push(P,N)}for(U=0,G=r.length;U<G;U++){v=r[U];C=A.getAt(U);t=Ext.apply({segment:{startAngle:v.startAngle,endAngle:v.endAngle,margin:0,rho:v.rho,startRho:v.rho*+c/100,endRho:v.rho}},Ext.apply(m,g&&{fill:g[U%z]}||{}));F=Ext.apply({},t.segment,{slice:v,series:w,storeItem:L,index:U});B[U]=F;if(!C){q=Ext.apply({type:"path",group:A},Ext.apply(m,g&&{fill:g[U%z]}||{}));C=M.add(Ext.apply(q,t))}v.sprite=v.sprite||[];F.sprite=C;v.sprite.push(C);if(S){t=w.renderer(C,L,t,U,b);C._to=t;w.onAnimate(C,{to:t})}else{t=w.renderer(C,L,Ext.apply(t,{hidden:false}),U,b);C.setAttributes(t,true)}}if(w.needle){u=u*Math.PI/180;if(!w.needleSprite){w.needleSprite=w.chart.surface.add({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))],"stroke-width":4,stroke:"#222"})}else{if(S){w.onAnimate(w.needleSprite,{to:{path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]}})}else{w.needleSprite.setAttributes({type:"path",path:["M",e+(w.radius*+c/100)*k(u),d+-Math.abs((w.radius*+c/100)*s(u)),"L",e+w.radius*k(u),d+-Math.abs(w.radius*s(u))]})}}w.needleSprite.setAttributes({hidden:false},true)}delete w.value},setValue:function(a){this.value=a;this.drawSeries()},onCreateLabel:function(c,b,a,d){},onPlaceLabel:function(c,g,e,d,h,a,b){},onPlaceCallout:function(){},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;return(e===0)&&(b>=g&&b<a&&k>=n.startRho&&k<=n.endRho)},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},getLegendColor:function(a){var b=this;return b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Line",{extend:"Ext.chart.series.Cartesian",alternateClassName:["Ext.chart.LineSeries","Ext.chart.LineChart"],requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.draw.Draw","Ext.fx.Anim"],type:"line",alias:"series.line",selectionTolerance:20,showMarkers:true,markerConfig:{},style:{},smooth:false,defaultSmoothness:3,fill:false,constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,g=e.chart.shadow,d,b;c.highlightCfg=Ext.Object.merge({"stroke-width":3},c.highlightCfg);Ext.apply(e,c,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)",translate:{x:1,y:1}}]});e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},shrink:function(b,k,l){var h=b.length,j=Math.floor(h/l),g=1,d=0,a=0,e=[b[0]],c=[k[0]];for(;g<h;++g){d+=b[g]||0;a+=k[g]||0;if(g%j==0){e.push(d/j);c.push(a/j);d=0;a=0}}return{x:e,y:c}},drawSeries:function(){var ak=this,au=ak.chart,T=au.axes,ao=au.getChartStore(),W=ao.getCount(),v=ak.chart.surface,am={},S=ak.group,L=ak.showMarkers,aA=ak.markerGroup,E=au.shadow,D=ak.shadowGroups,Y=ak.shadowAttributes,P=ak.smooth,r=D.length,ar=["M"],U=["M"],d=["M"],b=["M"],K=au.markerIndex,aj=[].concat(ak.axis),ai,av=[],ah={},ab=[],w={},J=false,R=[],az=ak.markerStyle,aa=ak.seriesStyle,u=ak.colorArrayStyle,Q=u&&u.length||0,M=Ext.isNumber,aw=ak.seriesIdx,h=ak.getAxesForXAndYFields(),m=h.xAxis,ay=h.yAxis,ad,k,ac,ae,B,c,af,I,H,g,e,t,s,X,O,N,at,n,G,F,aB,o,q,C,a,Z,ag,A,aq,z,ap,p,ax,an,al,V,l;if(ak.fireEvent("beforedraw",ak)===false){return}if(!W||ak.seriesIsHidden){ak.hide();ak.items=[];if(ak.line){ak.line.hide(true);if(ak.line.shadows){ad=ak.line.shadows;for(N=0,r=ad.length;N<r;N++){k=ad[N];k.hide(true)}}if(ak.fillPath){ak.fillPath.hide(true)}}ak.line=null;ak.fillPath=null;return}an=Ext.apply(az||{},ak.markerConfig,{fill:ak.seriesStyle.fill||u[aw%u.length]});V=an.type;delete an.type;al=aa;if(!al["stroke-width"]){al["stroke-width"]=0.5}if(K&&aA&&aA.getCount()){for(O=0;O<K;O++){F=aA.getAt(O);aA.remove(F);aA.add(F);aB=aA.getAt(aA.getCount()-2);F.setAttributes({x:0,y:0,translate:{x:aB.attr.translation.x,y:aB.attr.translation.y}},true)}}ak.unHighlightItem();ak.cleanHighlights();ak.setBBox();am=ak.bbox;ak.clipRect=[am.x,am.y,am.width,am.height];for(O=0,at=aj.length;O<at;O++){n=T.get(aj[O]);if(n){G=n.calcEnds();if(n.position=="top"||n.position=="bottom"){A=G.from;aq=G.to}else{z=G.from;ap=G.to}}}if(ak.xField&&!M(A)&&(m=="bottom"||m=="top")&&!T.get(m)){n=Ext.create("Ext.chart.axis.Axis",{chart:au,fields:[].concat(ak.xField)}).calcEnds();A=n.from;aq=n.to}if(ak.yField&&!M(z)&&(ay=="right"||ay=="left")&&!T.get(ay)){n=Ext.create("Ext.chart.axis.Axis",{chart:au,fields:[].concat(ak.yField)}).calcEnds();z=n.from;ap=n.to}if(isNaN(A)){A=0;Z=am.width/((W-1)||1)}else{Z=am.width/((aq-A)||(W-1)||1)}if(isNaN(z)){z=0;ag=am.height/((W-1)||1)}else{ag=am.height/((ap-z)||(W-1)||1)}ak.eachRecord(function(j,x){q=j.get(ak.xField);if(typeof q=="string"||typeof q=="object"&&!Ext.isDate(q)||m&&T.get(m)&&T.get(m).type=="Category"){if(q in ah){q=ah[q]}else{q=ah[q]=x}}C=j.get(ak.yField);if(typeof C=="undefined"||(typeof C=="string"&&!C)){return}if(typeof C=="string"||typeof C=="object"&&!Ext.isDate(C)||ay&&T.get(ay)&&T.get(ay).type=="Category"){C=x}R.push(x);av.push(q);ab.push(C)});at=av.length;if(at>am.width){a=ak.shrink(av,ab,am.width);av=a.x;ab=a.y}ak.items=[];l=0;at=av.length;for(O=0;O<at;O++){q=av[O];C=ab[O];if(C===false){if(U.length==1){U=[]}J=true;ak.items.push(false);continue}else{I=(am.x+(q-A)*Z).toFixed(2);H=((am.y+am.height)-(C-z)*ag).toFixed(2);if(J){J=false;U.push("M")}U=U.concat([I,H])}if((typeof s=="undefined")&&(typeof H!="undefined")){s=H;t=I}if(!ak.line||au.resizing){ar=ar.concat([I,am.y+am.height/2])}if(au.animate&&au.resizing&&ak.line){ak.line.setAttributes({path:ar},true);if(ak.fillPath){ak.fillPath.setAttributes({path:ar,opacity:0.2},true)}if(ak.line.shadows){ad=ak.line.shadows;for(N=0,r=ad.length;N<r;N++){k=ad[N];k.setAttributes({path:ar},true)}}}if(L){F=aA.getAt(l++);if(!F){F=Ext.chart.Shape[V](v,Ext.apply({group:[S,aA],x:0,y:0,translate:{x:+(g||I),y:e||(am.y+am.height/2)},value:'"'+q+", "+C+'"',zIndex:4000},an));F._to={translate:{x:+I,y:+H}}}else{F.setAttributes({value:'"'+q+", "+C+'"',x:0,y:0,hidden:false},true);F._to={translate:{x:+I,y:+H}}}}ak.items.push({series:ak,value:[q,C],point:[I,H],sprite:F,storeItem:ao.getAt(R[O])});g=I;e=H}if(U.length<=1){return}if(ak.smooth){b=Ext.draw.Draw.smooth(U,M(P)?P:ak.defaultSmoothness)}d=P?b:U;if(au.markerIndex&&ak.previousPath){ae=ak.previousPath;if(!P){Ext.Array.erase(ae,1,2)}}else{ae=U}if(!ak.line){ak.line=v.add(Ext.apply({type:"path",group:S,path:ar,stroke:al.stroke||al.fill},al||{}));if(E){ak.line.setAttributes(Ext.apply({},ak.shadowOptions),true)}ak.line.setAttributes({fill:"none",zIndex:3000});if(!al.stroke&&Q){ak.line.setAttributes({stroke:u[aw%Q]},true)}if(E){ad=ak.line.shadows=[];for(ac=0;ac<r;ac++){ai=Y[ac];ai=Ext.apply({},ai,{path:ar});k=v.add(Ext.apply({},{type:"path",group:D[ac]},ai));ad.push(k)}}}if(ak.fill){c=d.concat([["L",I,am.y+am.height],["L",t,am.y+am.height],["L",t,s]]);if(!ak.fillPath){ak.fillPath=v.add({group:S,type:"path",opacity:al.opacity||0.3,fill:al.fill||u[aw%Q],path:ar})}}X=L&&aA.getCount();if(au.animate){B=ak.fill;p=ak.line;af=ak.renderer(p,false,{path:d},O,ao);Ext.apply(af,al||{},{stroke:al.stroke||al.fill});delete af.fill;p.show(true);if(au.markerIndex&&ak.previousPath){ak.animation=ax=ak.onAnimate(p,{to:af,from:{path:ae}})}else{ak.animation=ax=ak.onAnimate(p,{to:af})}if(E){ad=p.shadows;for(N=0;N<r;N++){ad[N].show(true);if(au.markerIndex&&ak.previousPath){ak.onAnimate(ad[N],{to:{path:d},from:{path:ae}})}else{ak.onAnimate(ad[N],{to:{path:d}})}}}if(B){ak.fillPath.show(true);ak.onAnimate(ak.fillPath,{to:Ext.apply({},{path:c,fill:al.fill||u[aw%Q],"stroke-width":0},al||{})})}if(L){l=0;for(O=0;O<at;O++){if(ak.items[O]){o=aA.getAt(l++);if(o){af=ak.renderer(o,ao.getAt(O),o._to,O,ao);ak.onAnimate(o,{to:Ext.apply(af,an||{})});o.show(true)}}}for(;l<X;l++){o=aA.getAt(l);o.hide(true)}}}else{af=ak.renderer(ak.line,false,{path:d,hidden:false},O,ao);Ext.apply(af,al||{},{stroke:al.stroke||al.fill});delete af.fill;ak.line.setAttributes(af,true);if(E){ad=ak.line.shadows;for(N=0;N<r;N++){ad[N].setAttributes({path:d,hidden:false},true)}}if(ak.fill){ak.fillPath.setAttributes({path:c,hidden:false},true)}if(L){l=0;for(O=0;O<at;O++){if(ak.items[O]){o=aA.getAt(l++);if(o){af=ak.renderer(o,ao.getAt(O),o._to,O,ao);o.setAttributes(Ext.apply(an||{},af||{}),true);o.show(true)}}}for(;l<X;l++){o=aA.getAt(l);o.hide(true)}}}if(au.markerIndex){if(ak.smooth){Ext.Array.erase(U,1,2)}else{Ext.Array.splice(U,1,0,U[1],U[2])}ak.previousPath=U}ak.renderLabels();ak.renderCallouts();ak.fireEvent("draw",ak)},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,j=g.bbox,b=Ext.apply(a,g.seriesLabelStyle);return g.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:h,x:k.point[0],y:j.y+j.height/2},b||{}))},onPlaceLabel:function(g,k,s,p,o,d){var u=this,l=u.chart,r=l.resizing,t=u.label,q=t.renderer,b=t.field,a=u.bbox,j=s.point[0],h=s.point[1],c=s.sprite.attr.radius,e,n,m;g.setAttributes({text:q(k.get(b)),hidden:true},true);if(o=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(o=="under"||o=="over"){e=s.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(o=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(u.chart.animate&&!u.chart.resizing){g.show(true);u.onAnimate(g,{to:{x:j,y:h}})}else{g.setAttributes({x:j,y:h},true);if(r&&u.animation){u.animation.on("afteranimate",function(){g.show(true)})}else{g.show(true)}}},highlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&!a.highlighted){if(!("__strokeWidth" in a.line)){a.line.__strokeWidth=parseFloat(a.line.attr["stroke-width"])||0}if(a.line.__anim){a.line.__anim.paused=true}a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth+3}});a.highlighted=true}},unHighlightItem:function(){var a=this;a.callParent(arguments);if(a.line&&a.highlighted){a.line.__anim=Ext.create("Ext.fx.Anim",{target:a.line,to:{"stroke-width":a.line.__strokeWidth}});a.highlighted=false}},onPlaceCallout:function(m,r,J,G,F,d,k){if(!F){return}var M=this,s=M.chart,D=s.surface,H=s.resizing,L=M.callouts,t=M.items,v=G==0?false:t[G-1].point,z=(G==t.length-1)?false:t[G+1].point,c=[+J.point[0],+J.point[1]],A,g,N,K,o,q,I=L.offsetFromViz||30,C=L.offsetToSide||10,B=L.offsetBox||3,h,e,j,w,u,E=M.clipRect,b={width:L.styles.width||10,height:L.styles.height||10},n,l;if(!v){v=c}if(!z){z=c}K=(z[1]-v[1])/(z[0]-v[0]);o=(c[1]-v[1])/(c[0]-v[0]);q=(z[1]-c[1])/(z[0]-c[0]);g=Math.sqrt(1+K*K);A=[1/g,K/g];N=[-A[1],A[0]];if(o>0&&q<0&&N[1]<0||o<0&&q>0&&N[1]>0){N[0]*=-1;N[1]*=-1}else{if(Math.abs(o)<Math.abs(q)&&N[0]<0||Math.abs(o)>Math.abs(q)&&N[0]>0){N[0]*=-1;N[1]*=-1}}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(h<E[0]||(h+j)>(E[0]+E[2])){N[0]*=-1}if(e<E[1]||(e+w)>(E[1]+E[3])){N[1]*=-1}n=c[0]+N[0]*I;l=c[1]+N[1]*I;h=n+(N[0]>0?0:-(b.width+2*B));e=l-b.height/2-B;j=b.width+2*B;w=b.height+2*B;if(s.animate){M.onAnimate(m.lines,{to:{path:["M",c[0],c[1],"L",n,l,"Z"]}});if(m.panel){m.panel.setPosition(h,e,true)}}else{m.lines.setAttributes({path:["M",c[0],c[1],"L",n,l,"Z"]},true);if(m.panel){m.panel.setPosition(h,e)}}for(u in m){m[u].show(true)}},isItemInPoint:function(j,g,A,q){var C=this,n=C.items,s=C.selectionTolerance,k=null,z,c,p,v,h,w,b,t,a,l,B,e,d,o,u,r,D=Math.sqrt,m=Math.abs;c=n[q];z=q&&n[q-1];if(q>=h){z=n[h-1]}p=z&&z.point;v=c&&c.point;w=z?p[0]:v[0]-s;b=z?p[1]:v[1];t=c?v[0]:p[0]+s;a=c?v[1]:p[1];e=D((j-w)*(j-w)+(g-b)*(g-b));d=D((j-t)*(j-t)+(g-a)*(g-a));o=Math.min(e,d);if(o<=s){return o==e?z:c}return false},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Cartesian.prototype.hideAll.call(e)}else{Ext.chart.series.Cartesian.prototype.showAll.call(e)}if(e.line){e.line.setAttributes({hidden:!a},true);if(e.line.shadows){for(b=0,c=e.line.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}if(e.fillPath){e.fillPath.setAttributes({hidden:!a},true)}},hideAll:function(){this.toggleAll(false)},showAll:function(){this.toggleAll(true)}});Ext.define("Ext.chart.series.Pie",{alternateClassName:["Ext.chart.PieSeries","Ext.chart.PieChart"],extend:"Ext.chart.series.Series",type:"pie",alias:"series.pie",rad:Math.PI/180,highlightDuration:150,angleField:false,lengthField:false,donut:false,showInLegend:false,style:{},constructor:function(b){this.callParent(arguments);var h=this,g=h.chart,a=g.surface,j=g.store,k=g.shadow,d,c,e;b.highlightCfg=Ext.merge({segment:{margin:20}},b.highlightCfg);Ext.apply(h,b,{shadowAttributes:[{"stroke-width":6,"stroke-opacity":1,stroke:"rgb(200, 200, 200)",translate:{x:1.2,y:2}},{"stroke-width":4,"stroke-opacity":1,stroke:"rgb(150, 150, 150)",translate:{x:0.9,y:1.5}},{"stroke-width":2,"stroke-opacity":1,stroke:"rgb(100, 100, 100)",translate:{x:0.6,y:1}}]});h.group=a.getGroup(h.seriesId);if(k){for(d=0,c=h.shadowAttributes.length;d<c;d++){h.shadowGroups.push(a.getGroup(h.seriesId+"-shadows"+d))}}a.customAttributes.segment=function(l){var i=h.getSegment(l);if(!i.path||i.path.length===0){i.path=["M",0,0]}return i};h.__excludes=h.__excludes||[]},initialize:function(){var b=this,a=b.chart.getChartStore();b.yField=[];if(b.label.field){a.each(function(c){b.yField.push(c.get(b.label.field))})}},getSegment:function(d){var J=this,I=J.rad,i=Math.cos,a=Math.sin,p=J.centerX,n=J.centerY,E=0,D=0,C=0,A=0,l=0,k=0,j=0,g=0,w=0,c=0,v=0,b=0,G=0.01,z=d.startAngle,u=d.endAngle,o=(z+u)/2*I,r=d.margin||0,K=Math.min(z,u)*I,H=Math.max(z,u)*I,t=i(K),h=a(K),s=i(H),e=a(H),m=i(o),F=a(o),B=0,q=0.7071067811865476;if(H-K<G){return{path:""}}if(r!==0){p+=r*m;n+=r*F}D=p+d.endRho*t;k=n+d.endRho*h;A=p+d.endRho*s;g=n+d.endRho*e;v=p+d.endRho*m;b=n+d.endRho*F;if(d.startRho!==0){E=p+d.startRho*t;l=n+d.startRho*h;C=p+d.startRho*s;j=n+d.startRho*e;w=p+d.startRho*m;c=n+d.startRho*F;return{path:[["M",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",C,j],["A",d.startRho,d.startRho,0,B,0,w,c],["L",w,c],["A",d.startRho,d.startRho,0,0,0,E,l],["L",E,l],["Z"]]}}else{return{path:[["M",p,n],["L",D,k],["A",d.endRho,d.endRho,0,0,1,v,b],["L",v,b],["A",d.endRho,d.endRho,0,B,1,A,g],["L",A,g],["L",p,n],["Z"]]}}},calcMiddle:function(n){var i=this,j=i.rad,m=n.slice,l=i.centerX,k=i.centerY,h=m.startAngle,d=m.endAngle,g=+i.donut,c=-(h+d)*j/2,a=(n.endRho+n.startRho)/2,e=l+a*Math.cos(c),b=k-a*Math.sin(c);n.middle={x:e,y:b}},drawSeries:function(){var y=this,b=y.chart.getChartStore(),E=y.group,ae=y.chart.animate,q=y.angleField||y.field||y.xField,H=[].concat(y.lengthField),ad=0,W=y.colorSet,aj=y.chart,T=aj.surface,O=aj.chartBBox,m=aj.shadow,ab=y.shadowGroups,aa=y.shadowAttributes,an=ab.length,h=y.rad,U=H.length,I=0,d=+y.donut,al=[],am={},ak,F=[],k=false,B=0,X=0,l=9,ao=true,A=0,o=y.seriesStyle,a=y.seriesLabelStyle,g=y.colorArrayStyle,D=g&&g.length||0,R=aj.maxGutter[0],Q=aj.maxGutter[1],M=Math.abs,v,ac,ai,J,P,L,e,c,w,s=0,x,u,G,V,K,ap,N,S,ag,af,n,ah,z,r,Y,Z,t,C;Ext.apply(o,y.style||{});y.setBBox();C=y.bbox;if(y.colorSet){g=y.colorSet;D=g.length}if(!b||!b.getCount()||y.seriesIsHidden){y.hide();y.items=[];return}y.unHighlightItem();y.cleanHighlights();e=y.centerX=O.x+(O.width/2);c=y.centerY=O.y+(O.height/2);y.radius=Math.min(e-O.x,c-O.y);y.slices=u=[];y.items=F=[];b.each(function(j,p){if(this.__excludes&&this.__excludes[p]){return}B+=+j.get(q);if(H[0]){for(af=0,ad=0;af<U;af++){ad+=+j.get(H[af])}al[p]=ad;X=Math.max(X,ad)}},this);B=B||1;b.each(function(j,p){if(this.__excludes&&this.__excludes[p]){V=0}else{V=j.get(q);if(s==0){s=1}}if(s==1){s=2;y.firstAngle=A=360*V/B/2;for(af=0;af<p;af++){u[af].startAngle=u[af].endAngle=y.firstAngle}}ah=A-360*V/B;x={series:y,value:V,startAngle:A,endAngle:ah,storeItem:j};if(H[0]){ap=al[p];x.rho=y.radius*(ap/X)}else{x.rho=y.radius}u[p]=x;A=ah},y);if(m){for(ag=0,N=u.length;ag<N;ag++){x=u[ag];x.shadowAttrs=[];for(af=0,I=0,J=[];af<U;af++){G=E.getAt(ag*U+af);w=H[af]?b.getAt(ag).get(H[af])/al[ag]*x.rho:x.rho;v={segment:{startAngle:x.startAngle,endAngle:x.endAngle,margin:0,rho:x.rho,startRho:I+(w*d/100),endRho:I+w},hidden:!x.value&&(x.startAngle%360)==(x.endAngle%360)};for(L=0,J=[];L<an;L++){ai=aa[L];P=ab[L].getAt(ag);if(!P){P=aj.surface.add(Ext.apply({},{type:"path",group:ab[L],strokeLinejoin:"round"},v,ai))}if(ae){ai=y.renderer(P,b.getAt(ag),Ext.apply({},v,ai),ag,b);y.onAnimate(P,{to:ai})}else{ai=y.renderer(P,b.getAt(ag),ai,ag,b);P.setAttributes(ai,true)}J.push(P)}x.shadowAttrs[af]=J}}}for(ag=0,N=u.length;ag<N;ag++){x=u[ag];for(af=0,I=0;af<U;af++){G=E.getAt(ag*U+af);w=H[af]?b.getAt(ag).get(H[af])/al[ag]*x.rho:x.rho;v=Ext.apply({segment:{startAngle:x.startAngle,endAngle:x.endAngle,margin:0,rho:x.rho,startRho:I+(w*d/100),endRho:I+w},hidden:(!x.value&&(x.startAngle%360)==(x.endAngle%360))},Ext.apply(o,g&&{fill:g[(U>1?af:ag)%D]}||{}));K=Ext.apply({},v.segment,{slice:x,series:y,storeItem:x.storeItem,index:ag});y.calcMiddle(K);if(m){K.shadows=x.shadowAttrs[af]}F[ag]=K;if(!G){t=Ext.apply({type:"path",group:E,middle:K.middle},Ext.apply(o,g&&{fill:g[(U>1?af:ag)%D]}||{}));G=T.add(Ext.apply(t,v))}x.sprite=x.sprite||[];K.sprite=G;x.sprite.push(G);x.point=[K.middle.x,K.middle.y];if(ae){v=y.renderer(G,b.getAt(ag),v,ag,b);G._to=v;G._animating=true;y.onAnimate(G,{to:v,listeners:{afteranimate:{fn:function(){this._animating=false},scope:G}}})}else{v=y.renderer(G,b.getAt(ag),Ext.apply(v,{hidden:false}),ag,b);G.setAttributes(v,true)}I+=w}}N=E.getCount();for(ag=0;ag<N;ag++){if(!u[(ag/U)>>0]&&E.getAt(ag)){E.getAt(ag).hide(true)}}if(m){an=ab.length;for(L=0;L<N;L++){if(!u[(L/U)>>0]){for(af=0;af<an;af++){if(ab[af].getAt(L)){ab[af].getAt(L).hide(true)}}}}}y.renderLabels();y.renderCallouts()},onCreateLabel:function(g,l,e,h){var j=this,k=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,m=l.middle,b=Ext.apply(j.seriesLabelStyle||{},a||{});return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:k,x:m.x,y:m.y},b))},onPlaceLabel:function(k,p,z,t,s,e,g){var B=this,q=B.chart,w=q.resizing,A=B.label,u=A.renderer,c=[].concat(A.field),m=B.centerX,l=B.centerY,C=z.middle,b={x:C.x,y:C.y},o=C.x-m,n=C.y-l,r={},d=1,j=Math.atan2(n,o||1),v=j*180/Math.PI,h;b.hidden=false;if(this.__excludes&&this.__excludes[t]){b.hidden=true}function a(i){if(i<0){i+=360}return i%360}k.setAttributes({text:u(p.get(c[g]))},true);switch(s){case"outside":d=Math.sqrt(o*o+n*n)*2;b.x=d*Math.cos(j)+m;b.y=d*Math.sin(j)+l;break;case"rotate":v=a(v);v=(v>90&&v<270)?v+180:v;h=k.attr.rotation.degrees;if(h!=null&&Math.abs(h-v)>180){if(v>h){v-=360}else{v+=360}v=v%360}else{v=a(v)}b.rotate={degrees:v,x:b.x,y:b.y};break;default:break}b.translate={x:0,y:0};if(e&&!w&&(s!="rotate"||h!=null)){B.onAnimate(k,{to:b})}else{k.setAttributes(b,true)}k._from=r},onPlaceCallout:function(l,o,A,v,u,d,e){var C=this,q=C.chart,w=q.resizing,B=C.callouts,j=C.centerX,h=C.centerY,D=A.middle,b={x:D.x,y:D.y},n=D.x-j,k=D.y-h,c=1,m,g=Math.atan2(k,n||1),a=l.label.getBBox(),z=20,t=10,s=10,r;c=A.endRho+z;m=(A.endRho+A.startRho)/2+(A.endRho-A.startRho)/3;b.x=c*Math.cos(g)+j;b.y=c*Math.sin(g)+h;n=m*Math.cos(g);k=m*Math.sin(g);if(q.animate){C.onAnimate(l.lines,{to:{path:["M",n+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",n>0?t:-t,0,"z"]}});C.onAnimate(l.box,{to:{x:b.x+(n>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s}});C.onAnimate(l.label,{to:{x:b.x+(n>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)}})}else{l.lines.setAttributes({path:["M",n+j,k+h,"L",b.x,b.y,"Z","M",b.x,b.y,"l",n>0?t:-t,0,"z"]},true);l.box.setAttributes({x:b.x+(n>0?t:-(t+a.width+2*s)),y:b.y+(k>0?(-a.height-s/2):(-a.height-s/2)),width:a.width+2*s,height:a.height+2*s},true);l.label.setAttributes({x:b.x+(n>0?(t+s):-(t+a.width+s)),y:b.y+(k>0?-a.height/4:-a.height/4)},true)}for(r in l){l[r].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(l,j,n,e){var h=this,d=h.centerX,c=h.centerY,p=Math.abs,o=p(l-d),m=p(j-c),g=n.startAngle,a=n.endAngle,k=Math.sqrt(o*o+m*m),b=Math.atan2(j-c,l-d)/h.rad;if(b>h.firstAngle){b-=360}return(b<=g&&b>a&&k>=n.startRho&&k<=n.endRho)},hideAll:function(){var e,b,h,g,d,a,c;if(!isNaN(this._index)){this.__excludes=this.__excludes||[];this.__excludes[this._index]=true;c=this.slices[this._index].sprite;for(d=0,a=c.length;d<a;d++){c[d].setAttributes({hidden:true},true)}if(this.slices[this._index].shadowAttrs){for(e=0,g=this.slices[this._index].shadowAttrs,b=g.length;e<b;e++){h=g[e];for(d=0,a=h.length;d<a;d++){h[d].setAttributes({hidden:true},true)}}}this.drawSeries()}},showAll:function(){if(!isNaN(this._index)){this.__excludes[this._index]=false;this.drawSeries()}},highlightItem:function(s){var u=this,t=u.rad;s=s||this.items[this._index];this.unHighlightItem();if(!s||s.sprite&&s.sprite._animating){return}u.callParent([s]);if(!u.highlight){return}if("segment" in u.highlightCfg){var w=u.highlightCfg.segment,d=u.chart.animate,o,q,a,e,k,b,m,c;if(u.labelsGroup){var g=u.labelsGroup,p=u.label.display,h=g.getAt(s.index),v=(s.startAngle+s.endAngle)/2*t,n=w.margin||0,l=n*Math.cos(v),j=n*Math.sin(v);if(Math.abs(l)<1e-10){l=0}if(Math.abs(j)<1e-10){j=0}if(d){h.stopAnimation();h.animate({to:{translate:{x:l,y:j}},duration:u.highlightDuration})}else{h.setAttributes({translate:{x:l,y:j}},true)}}if(u.chart.shadow&&s.shadows){q=0;a=s.shadows;k=a.length;for(;q<k;q++){e=a[q];b={};m=s.sprite._from.segment;for(c in m){if(!(c in w)){b[c]=m[c]}}o={segment:Ext.applyIf(b,u.highlightCfg.segment)};if(d){e.stopAnimation();e.animate({to:o,duration:u.highlightDuration})}else{e.setAttributes(o,true)}}}}},unHighlightItem:function(){var w=this;if(!w.highlight){return}if(("segment" in w.highlightCfg)&&w.items){var l=w.items,e=w.chart.animate,d=!!w.chart.shadow,k=w.labelsGroup,t=l.length,s=0,r=0,q=w.label.display,x,m,c,a,v,n,b,g,u,h,o;for(;s<t;s++){u=l[s];if(!u){continue}n=u.sprite;if(n&&n._highlighted){if(k){h=k.getAt(u.index);o=Ext.apply({translate:{x:0,y:0}},q=="rotate"?{rotate:{x:h.attr.x,y:h.attr.y,degrees:h.attr.rotation.degrees}}:{});if(e){h.stopAnimation();h.animate({to:o,duration:w.highlightDuration})}else{h.setAttributes(o,true)}}if(d){b=u.shadows;x=b.length;for(;r<x;r++){c={};a=u.sprite._to.segment;v=u.sprite._from.segment;Ext.apply(c,v);for(m in a){if(!(m in v)){c[m]=a[m]}}g=b[r];if(e){g.stopAnimation();g.animate({to:{segment:c},duration:w.highlightDuration})}else{g.setAttributes({segment:c},true)}}}}}}w.callParent(arguments)},getLegendColor:function(a){var b=this;return(b.colorSet&&b.colorSet[a%b.colorSet.length])||b.colorArrayStyle[a%b.colorArrayStyle.length]}});Ext.define("Ext.chart.series.Radar",{extend:"Ext.chart.series.Series",requires:["Ext.chart.Shape","Ext.fx.Anim"],type:"radar",alias:"series.radar",rad:Math.PI/180,showInLegend:false,style:{},constructor:function(c){this.callParent(arguments);var e=this,a=e.chart.surface,d,b;e.group=a.getGroup(e.seriesId);if(e.showMarkers){e.markerGroup=a.getGroup(e.seriesId+"-markers")}},drawSeries:function(){var M=this,n=M.chart.getChartStore(),p=M.group,D,z=M.chart,m=z.animate,d=M.field||M.yField,F=z.surface,u=z.chartBBox,w=M.seriesIdx,b=M.colorArrayStyle,r,q,A,j,K=0,E=[],I=Math.max,g=Math.cos,a=Math.sin,C=Math.PI*2,G=n.getCount(),L,B,t,s,e,H,c,k=M.seriesStyle,J=M.seriesLabelStyle,o=z.resizing||!M.radar,h=z.axes&&z.axes.get(0),v=!(h&&h.maximum);M.setBBox();K=v?0:(h.maximum||0);Ext.apply(k,M.style||{});if(!n||!n.getCount()||M.seriesIsHidden){M.hide();M.items=[];if(M.radar){M.radar.hide(true)}M.radar=null;return}if(!k.stroke){k.stroke=b[w%b.length]}M.unHighlightItem();M.cleanHighlights();r=M.centerX=u.x+(u.width/2);q=M.centerY=u.y+(u.height/2);M.radius=j=Math.min(u.width,u.height)/2;M.items=A=[];if(v){z.series.each(function(i){E.push(i.yField)});n.each(function(l,x){for(x=0,c=E.length;x<c;x++){K=I(+l.get(E[x]),K)}})}K=K||1;L=[];B=[];n.each(function(l,x){e=j*l.get(d)/K;t=e*g(x/G*C);s=e*a(x/G*C);if(x==0){B.push("M",t+r,s+q);L.push("M",0.01*t+r,0.01*s+q)}else{B.push("L",t+r,s+q);L.push("L",0.01*t+r,0.01*s+q)}A.push({sprite:false,point:[r+t,q+s],storeItem:l,series:M})});B.push("Z");if(!M.radar){M.radar=F.add(Ext.apply({type:"path",group:p,path:L},k||{}))}if(z.resizing){M.radar.setAttributes({path:L},true)}if(z.animate){M.onAnimate(M.radar,{to:Ext.apply({path:B},k||{})})}else{M.radar.setAttributes(Ext.apply({path:B},k||{}),true)}if(M.showMarkers){M.drawMarkers()}M.renderLabels();M.renderCallouts()},drawMarkers:function(){var n=this,k=n.chart,a=k.surface,b=Ext.apply({},n.markerStyle||{}),j=Ext.apply(b,n.markerConfig,{fill:n.colorArrayStyle[n.seriesIdx%n.colorArrayStyle.length]}),m=n.items,o=j.type,q=n.markerGroup,e=n.centerX,d=n.centerY,p,h,c,g;delete j.type;for(h=0,c=m.length;h<c;h++){p=m[h];g=q.getAt(h);if(!g){g=Ext.chart.Shape[o](a,Ext.apply({group:q,x:0,y:0,translate:{x:e,y:d}},j))}else{g.show()}p.sprite=g;if(k.resizing){g.setAttributes({x:0,y:0,translate:{x:e,y:d}},true)}g._to={translate:{x:p.point[0],y:p.point[1]}};if(k.animate){n.onAnimate(g,{to:g._to})}else{g.setAttributes(Ext.apply(g._to,j||{}),true)}}},isItemInPoint:function(c,g,e){var b,d=10,a=Math.abs;b=e.point;return(a(b[0]-c)<=d&&a(b[1]-g)<=d)},onCreateLabel:function(g,m,e,h){var j=this,l=j.labelsGroup,a=j.label,d=j.centerX,c=j.centerY,k=m.point,b=Ext.apply(j.seriesLabelStyle||{},a);return j.chart.surface.add(Ext.apply({type:"text","text-anchor":"middle",group:l,x:d,y:c},a||{}))},onPlaceLabel:function(q,h,s,g,k,b){var m=this,l=m.chart,j=l.resizing,c=m.label,r=c.renderer,p=c.field,e=m.centerX,d=m.centerY,a={x:s.point[0],y:s.point[1]},o=a.x-e,n=a.y-d;q.setAttributes({text:r(h.get(p)),hidden:true},true);if(j){q.setAttributes({x:e,y:d},true)}if(b){q.show(true);m.onAnimate(q,{to:a})}else{q.setAttributes(a,true);q.show(true)}},toggleAll:function(a){var e=this,b,d,g,c;if(!a){Ext.chart.series.Radar.superclass.hideAll.call(e)}else{Ext.chart.series.Radar.superclass.showAll.call(e)}if(e.radar){e.radar.setAttributes({hidden:!a},true);if(e.radar.shadows){for(b=0,c=e.radar.shadows,d=c.length;b<d;b++){g=c[b];g.setAttributes({hidden:!a},true)}}}},hideAll:function(){this.toggleAll(false);this.hideMarkers(0)},showAll:function(){this.toggleAll(true)},hideMarkers:function(a){var d=this,c=d.markerGroup&&d.markerGroup.getCount()||0,b=a||0;for(;b<c;b++){d.markerGroup.getAt(b).hide(true)}}});Ext.define("Ext.chart.series.Scatter",{extend:"Ext.chart.series.Cartesian",requires:["Ext.chart.axis.Axis","Ext.chart.Shape","Ext.fx.Anim"],type:"scatter",alias:"series.scatter",constructor:function(c){this.callParent(arguments);var e=this,g=e.chart.shadow,a=e.chart.surface,d,b;Ext.apply(e,c,{style:{},markerConfig:{},shadowAttributes:[{"stroke-width":6,"stroke-opacity":0.05,stroke:"rgb(0, 0, 0)"},{"stroke-width":4,"stroke-opacity":0.1,stroke:"rgb(0, 0, 0)"},{"stroke-width":2,"stroke-opacity":0.15,stroke:"rgb(0, 0, 0)"}]});e.group=a.getGroup(e.seriesId);if(g){for(d=0,b=e.shadowAttributes.length;d<b;d++){e.shadowGroups.push(a.getGroup(e.seriesId+"-shadows"+d))}}},getBounds:function(){var m=this,l=m.chart,o=l.getChartStore(),j=[].concat(m.axis),q,p,c,k,g,e,b,a,h,d,n;m.setBBox();q=m.bbox;for(h=0,k=j.length;h<k;h++){d=l.axes.get(j[h]);if(d){n=d.calcEnds();if(d.position=="top"||d.position=="bottom"){g=n.from;b=n.to}else{e=n.from;a=n.to}}}if(m.xField&&!Ext.isNumber(g)){d=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(m.xField)}).calcEnds();g=d.from;b=d.to}if(m.yField&&!Ext.isNumber(e)){d=Ext.create("Ext.chart.axis.Axis",{chart:l,fields:[].concat(m.yField)}).calcEnds();e=d.from;a=d.to}if(isNaN(g)){g=0;b=o.getCount()-1;p=q.width/(o.getCount()-1)}else{p=q.width/(b-g)}if(isNaN(e)){e=0;a=o.getCount()-1;c=q.height/(o.getCount()-1)}else{c=q.height/(a-e)}return{bbox:q,minX:g,minY:e,xScale:p,yScale:c}},getPaths:function(){var t=this,k=t.chart,b=k.shadow,d=k.getChartStore(),h=t.group,e=t.bounds=t.getBounds(),a=t.bbox,v=e.xScale,c=e.yScale,r=e.minX,q=e.minY,u=a.x,s=a.y,g=a.height,l=t.items=[],n=[],j,i,o,p,m;d.each(function(w,x){o=w.get(t.xField);p=w.get(t.yField);if(typeof p=="undefined"||(typeof p=="string"&&!p)||o==null||p==null){return}if(typeof o=="string"||typeof o=="object"&&!Ext.isDate(o)){o=x}if(typeof p=="string"||typeof p=="object"&&!Ext.isDate(p)){p=x}j=u+(o-r)*v;i=s+g-(p-q)*c;n.push({x:j,y:i});t.items.push({series:t,value:[o,p],point:[j,i],storeItem:w});if(k.animate&&k.resizing){m=h.getAt(x);if(m){t.resetPoint(m);if(b){t.resetShadow(m)}}}});return n},resetPoint:function(a){var b=this.bbox;a.setAttributes({translate:{x:(b.x+b.width)/2,y:(b.y+b.height)/2}},true)},resetShadow:function(c){var g=this,e=c.shadows,j=g.shadowAttributes,d=g.shadowGroups.length,h=g.bbox,b,a;for(b=0;b<d;b++){a=Ext.apply({},j[b]);if(a.translate){a.translate.x+=(h.x+h.width)/2;a.translate.y+=(h.y+h.height)/2}else{a.translate={x:(h.x+h.width)/2,y:(h.y+h.height)/2}}e[b].setAttributes(a,true)}},createPoint:function(a,c){var d=this,b=d.chart,e=d.group,g=d.bbox;return Ext.chart.Shape[c](b.surface,Ext.apply({},{x:0,y:0,group:e,translate:{x:(g.x+g.width)/2,y:(g.y+g.height)/2}},a))},createShadow:function(n,g,k){var j=this,h=j.chart,l=j.shadowGroups,d=j.shadowAttributes,a=l.length,o=j.bbox,c,m,b,e;n.shadows=b=[];for(c=0;c<a;c++){e=Ext.apply({},d[c]);if(e.translate){e.translate.x+=(o.x+o.width)/2;e.translate.y+=(o.y+o.height)/2}else{Ext.apply(e,{translate:{x:(o.x+o.width)/2,y:(o.y+o.height)/2}})}Ext.apply(e,g);m=Ext.chart.Shape[k](h.surface,Ext.apply({},{x:0,y:0,group:l[c]},e));b.push(m)}},drawSeries:function(){var u=this,l=u.chart,h=l.getChartStore(),j=u.group,c=l.shadow,a=u.shadowGroups,q=u.shadowAttributes,r=a.length,m,n,o,k,p,t,e,g,b,d,s;t=Ext.apply(u.markerStyle,u.markerConfig);g=t.type;delete t.type;if(!h||!h.getCount()){u.hide();u.items=[];return}u.unHighlightItem();u.cleanHighlights();n=u.getPaths();k=n.length;for(p=0;p<k;p++){o=n[p];m=j.getAt(p);Ext.apply(o,t);if(!m){m=u.createPoint(o,g);if(c){u.createShadow(m,t,g)}}b=m.shadows;if(l.animate){d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;u.onAnimate(m,{to:d});for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);u.onAnimate(b[e],{to:d})}}else{d=u.renderer(m,h.getAt(p),{translate:o},p,h);m._to=d;m.setAttributes(d,true);for(e=0;e<r;e++){s=Ext.apply({},q[e]);d=u.renderer(b[e],h.getAt(p),Ext.apply({},{hidden:false,translate:{x:o.x+(s.translate?s.translate.x:0),y:o.y+(s.translate?s.translate.y:0)}},s),p,h);b[e].setAttributes(d,true)}}u.items[p].sprite=m}k=j.getCount();for(p=n.length;p<k;p++){j.getAt(p).hide(true)}u.renderLabels();u.renderCallouts()},onCreateLabel:function(d,k,c,e){var g=this,h=g.labelsGroup,a=g.label,b=Ext.apply({},a,g.seriesLabelStyle),j=g.bbox;return g.chart.surface.add(Ext.apply({type:"text",group:h,x:k.point[0],y:j.y+j.height/2},b))},onPlaceLabel:function(g,k,t,q,p,d){var v=this,l=v.chart,s=l.resizing,u=v.label,r=u.renderer,b=u.field,a=v.bbox,j=t.point[0],h=t.point[1],c=t.sprite.attr.radius,e,n,m,o;g.setAttributes({text:r(k.get(b)),hidden:true},true);if(p=="rotate"){g.setAttributes({"text-anchor":"start",rotation:{x:j,y:h,degrees:-45}},true);e=g.getBBox();n=e.width;m=e.height;j=j<a.x?a.x:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=(h-m<a.y)?a.y+m:h}else{if(p=="under"||p=="over"){e=t.sprite.getBBox();e.width=e.width||(c*2);e.height=e.height||(c*2);h=h+(p=="over"?-e.height:e.height);e=g.getBBox();n=e.width/2;m=e.height/2;j=j-n<a.x?a.x+n:j;j=(j+n>a.x+a.width)?(j-(j+n-a.x-a.width)):j;h=h-m<a.y?a.y+m:h;h=(h+m>a.y+a.height)?(h-(h+m-a.y-a.height)):h}}if(!l.animate){g.setAttributes({x:j,y:h},true);g.show(true)}else{if(s){o=t.sprite.getActiveAnimation();if(o){o.on("afteranimate",function(){g.setAttributes({x:j,y:h},true);g.show(true)})}else{g.show(true)}}else{v.onAnimate(g,{to:{x:j,y:h}})}}},onPlaceCallout:function(k,m,B,z,w,c,h){var E=this,n=E.chart,u=n.surface,A=n.resizing,D=E.callouts,o=E.items,b=B.point,F,a=k.label.getBBox(),C=30,t=10,s=3,e,d,g,r,q,v=E.bbox,l,j;F=[Math.cos(Math.PI/4),-Math.sin(Math.PI/4)];l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(e<v[0]||(e+g)>(v[0]+v[2])){F[0]*=-1}if(d<v[1]||(d+r)>(v[1]+v[3])){F[1]*=-1}l=b[0]+F[0]*C;j=b[1]+F[1]*C;e=l+(F[0]>0?0:-(a.width+2*s));d=j-a.height/2-s;g=a.width+2*s;r=a.height+2*s;if(n.animate){E.onAnimate(k.lines,{to:{path:["M",b[0],b[1],"L",l,j,"Z"]}},true);E.onAnimate(k.box,{to:{x:e,y:d,width:g,height:r}},true);E.onAnimate(k.label,{to:{x:l+(F[0]>0?s:-(a.width+s)),y:j}},true)}else{k.lines.setAttributes({path:["M",b[0],b[1],"L",l,j,"Z"]},true);k.box.setAttributes({x:e,y:d,width:g,height:r},true);k.label.setAttributes({x:l+(F[0]>0?s:-(a.width+s)),y:j},true)}for(q in k){k[q].show(true)}},onAnimate:function(b,a){b.show();return this.callParent(arguments)},isItemInPoint:function(c,h,e){var b,d=10,a=Math.abs;function g(i){var k=a(i[0]-c),j=a(i[1]-h);return Math.sqrt(k*k+j*j)}b=e.point;return(b[0]-d<=c&&b[0]+d>=c&&b[1]-d<=h&&b[1]+d>=h)}});Ext.define("Ext.tip.QuickTip",{extend:"Ext.tip.ToolTip",alternateClassName:"Ext.QuickTip",interceptTitles:false,title:"&#160;",tagConfig:{namespace:"data-",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var h=Ext.isArray(c)?c:arguments,d=0,a=h.length,g,b,e;for(;d<a;d++){c=h[d];g=c.target;if(g){if(Ext.isArray(g)){for(b=0,e=g.length;b<e;b++){this.targets[Ext.id(g[b])]=c}}else{this.targets[Ext.id(g)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&&c.el==a){b.hide()}}else{if(c&&c.el==a){b.clearTimer("show")}}},getTipCfg:function(d){var c=d.getTarget(),b=c.title,a;if(this.interceptTitles&&b&&Ext.isString(b)){c.qtip=b;c.removeAttribute("title");d.preventDefault();return{text:b}}else{a=this.tagConfig;c=d.getTarget("["+a.namespace+a.attribute+"]");if(c){return{target:c,text:c.getAttribute(a.namespace+a.attribute)}}}},onTargetOver:function(h){var j=this,i=h.getTarget(j.delegate),a,d,b,g,k,c,l;if(j.disabled){return}j.targetXY=h.getXY();if(!i||i.nodeType!==1||i==document.documentElement||i==document.body){return}if(j.activeTarget&&((i==j.activeTarget.el)||Ext.fly(j.activeTarget.el).contains(i))){j.clearTimer("hide");j.show();return}if(i){Ext.Object.each(j.targets,function(e,m){var n=Ext.fly(m.target);if(n&&(n.dom===i||n.contains(i))){b=n.dom;return false}});if(b){j.activeTarget=j.targets[b.id];j.activeTarget.el=i;j.anchor=j.activeTarget.anchor;if(j.anchor){j.anchorTarget=i}a=Ext.isDefined(j.activeTarget.showDelay);if(a){d=j.showDelay;j.showDelay=j.activeTarget.showDelay}j.delayShow();if(a){j.showDelay=d}return}}b=Ext.get(i);g=j.tagConfig;k=g.namespace;c=j.getTipCfg(h);if(c){if(c.target){i=c.target;b=Ext.get(i)}l=b.getAttribute(k+g.hide);j.activeTarget={el:i,text:c.text,width:+b.getAttribute(k+g.width)||null,autoHide:l!="user"&&l!=="false",title:b.getAttribute(k+g.title),cls:b.getAttribute(k+g.cls),align:b.getAttribute(k+g.align)};j.anchor=b.getAttribute(k+g.anchor);if(j.anchor){j.anchorTarget=i}a=Ext.isDefined(j.activeTarget.showDelay);if(a){d=j.showDelay;j.showDelay=j.activeTarget.showDelay}j.delayShow();if(a){j.showDelay=d}}},onTargetOut:function(g){var c=this,d=c.activeTarget,a,b;if(d&&g.within(c.activeTarget.el)&&!c.getTipCfg(g)){return}c.clearTimer("show");if(c.autoHide!==false){a=d&&Ext.isDefined(d.hideDelay);if(a){b=c.hideDelay;c.hideDelay=d.hideDelay}c.delayHide();if(a){c.hideDelay=b}}},showAt:function(c){var a=this,b=a.activeTarget;if(b){if(!a.rendered){a.render(Ext.getBody());a.activeTarget=b}if(b.title){a.setTitle(b.title||"");a.header.show()}else{a.header.hide()}a.body.update(b.text);a.autoHide=b.autoHide;a.dismissDelay=b.dismissDelay||a.dismissDelay;if(a.lastCls){a.el.removeCls(a.lastCls);delete a.lastCls}if(b.cls){a.el.addCls(b.cls);a.lastCls=b.cls}a.setWidth(b.width);if(a.anchor){a.constrainPosition=false}else{if(b.align){c=a.el.getAlignToXY(b.el,b.align);a.constrainPosition=false}else{a.constrainPosition=true}}}a.callParent([c])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define("Ext.tip.QuickTipManager",function(){var b,a=false;return{requires:["Ext.tip.QuickTip"],singleton:true,alternateClassName:"Ext.QuickTips",init:function(g,d){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(g)});return}var c=Ext.apply({disabled:a,id:"ext-quicktips-tip"},d),e=c.className,h=c.xtype;if(e){delete c.className}else{if(h){e="widget."+h;delete c.xtype}}if(g!==false){c.renderTo=document.body}b=Ext.create(e||"Ext.tip.QuickTip",c)}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&&!a){b.disable()}},ddEnable:function(){if(b&&!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&&!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}());Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.ModelManager","Ext.data.Model","Ext.data.StoreManager","Ext.tip.QuickTipManager","Ext.ComponentManager","Ext.app.EventBus"],scope:undefined,enableQuickTips:true,appFolder:"app",autoCreateViewport:false,constructor:function(b){b=b||{};Ext.apply(this,b);var d=b.requires||[];Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){Ext.Object.each(this.paths,function(h,i){Ext.Loader.setPath(h,i)})}this.callParent(arguments);this.eventbus=new Ext.app.EventBus;var g=Ext.Array.from(this.controllers),e=g&&g.length,c,a;this.controllers=new Ext.util.MixedCollection();if(this.autoCreateViewport){d.push(this.getModuleClassName("Viewport","view"))}for(c=0;c<e;c++){d.push(this.getModuleClassName(g[c],"controller"))}Ext.require(d);Ext.onReady(function(){for(c=0;c<e;c++){a=this.getController(g[c]);a.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(b,c,a){this.eventbus.control(b,c,a)},launch:Ext.emptyFn,onBeforeLaunch:function(){if(this.enableQuickTips){Ext.tip.QuickTipManager.init()}if(this.autoCreateViewport){this.getView("Viewport").create()}this.launch.call(this.scope||this);this.launched=true;this.fireEvent("launch",this);this.controllers.each(function(a){a.onLaunch(this)},this)},getModuleClassName:function(a,c){var b=Ext.Loader.getPrefix(a);if(b.length>0&&b!==a){return a}return this.name+"."+c+"."+a},getController:function(b){var a=this.controllers.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"controller"),{application:this,id:b});this.controllers.add(a)}return a},getStore:function(b){var a=Ext.StoreManager.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,"store"),{storeId:b})}return a},getModel:function(a){a=this.getModuleClassName(a,"model");return Ext.ModelManager.getModel(a)},getView:function(a){a=this.getModuleClassName(a,"view");return Ext.ClassManager.get(a)}});Ext.define("Ext.form.field.HtmlEditor",{extend:"Ext.Component",mixins:{labelable:"Ext.form.Labelable",field:"Ext.form.field.Field"},alias:"widget.htmleditor",alternateClassName:"Ext.form.HtmlEditor",requires:["Ext.tip.QuickTipManager","Ext.picker.Color","Ext.toolbar.Item","Ext.toolbar.Toolbar","Ext.util.Format","Ext.layout.component.field.HtmlEditor"],childEls:["iframeEl","textareaEl"],fieldSubTpl:["{%this.renderToolbar(out, values)%}","{beforeTextAreaTpl}",'<textarea id="{cmpId}-textareaEl" name="{name}" tabIndex="-1" {inputAttrTpl}',' class="{textareaCls}" style="{size}" autocomplete="off">',"{value}","</textarea>","{afterTextAreaTpl}","{beforeIFrameTpl}",'<iframe id="{cmpId}-iframeEl" name="{iframeName}" frameBorder="0" {iframeAttrTpl}',' style="overflow:auto;{size}" src="{iframeSrc}"></iframe>',"{afterIFrameTpl}",{disableFormats:true,renderToolbar:function(b,a){Ext.DomHelper.generateMarkup(a.$comp.toolbar.getRenderTree(),b)}}],subTplInsertions:["beforeTextAreaTpl","afterTextAreaTpl","beforeIFrameTpl","afterIFrameTpl","iframeAttrTpl","inputAttrTpl"],enableFormat:true,enableFontSize:true,enableColors:true,enableAlignments:true,enableLists:true,enableSourceEdit:true,enableLinks:true,enableFont:true,createLinkText:"Please enter the URL for the link:",defaultLinkValue:"http://",fontFamilies:["Arial","Courier New","Tahoma","Times New Roman","Verdana"],defaultFont:"tahoma",defaultValue:(Ext.isOpera||Ext.isIE6)?"&#160;":"&#8203;",fieldBodyCls:Ext.baseCSSPrefix+"html-editor-wrap",componentLayout:"htmleditor",initialized:false,activated:false,sourceEditMode:false,iframePad:3,hideMode:"offsets",maskOnDisable:true,initComponent:function(){var a=this;a.addEvents("initialize","activate","beforesync","beforepush","sync","push","editmodechange");a.callParent(arguments);a.createToolbar(a);a.initLabelable();a.initField()},getRefItems:function(){return[this.toolbar]},createToolbar:function(g){var j=this,h=[],c,l=Ext.tip.QuickTipManager&&Ext.tip.QuickTipManager.isEnabled(),e=Ext.baseCSSPrefix,d,k,b;function a(n,i,m){return{itemId:n,cls:e+"btn-icon",iconCls:e+"edit-"+n,enableToggle:i!==false,scope:g,handler:m||g.relayBtnCmd,clickEvent:"mousedown",tooltip:l?g.buttonTips[n]||b:b,overflowText:g.buttonTips[n].title||b,tabIndex:-1}}if(j.enableFont&&!Ext.isSafari2){d=Ext.widget("component",{renderTpl:['<select id="{id}-selectEl" class="{cls}">','<tpl for="fonts">','<option value="{[values.toLowerCase()]}" style="font-family:{.}"<tpl if="values.toLowerCase()==parent.defaultFont"> selected</tpl>>{.}</option>',"</tpl>","</select>"],renderData:{cls:e+"font-select",fonts:j.fontFamilies,defaultFont:j.defaultFont},childEls:["selectEl"],afterRender:function(){j.fontSelect=this.selectEl;Ext.Component.prototype.afterRender.apply(this,arguments)},onDisable:function(){var i=this.selectEl;if(i){i.dom.disabled=true}Ext.Component.prototype.onDisable.apply(this,arguments)},onEnable:function(){var i=this.selectEl;if(i){i.dom.disabled=false}Ext.Component.prototype.onEnable.apply(this,arguments)},listeners:{change:function(){j.relayCmd("fontname",j.fontSelect.dom.value);j.deferFocus()},element:"selectEl"}});h.push(d,"-")}if(j.enableFormat){h.push(a("bold"),a("italic"),a("underline"))}if(j.enableFontSize){h.push("-",a("increasefontsize",false,j.adjustFont),a("decreasefontsize",false,j.adjustFont))}if(j.enableColors){h.push("-",{itemId:"forecolor",cls:e+"btn-icon",iconCls:e+"edit-forecolor",overflowText:g.buttonTips.forecolor.title,tooltip:l?g.buttonTips.forecolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,clickEvent:"mousedown",handler:function(m,i){j.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus();this.up("menu").hide()}}]})},{itemId:"backcolor",cls:e+"btn-icon",iconCls:e+"edit-backcolor",overflowText:g.buttonTips.backcolor.title,tooltip:l?g.buttonTips.backcolor||b:b,tabIndex:-1,menu:Ext.widget("menu",{plain:true,items:[{xtype:"colorpicker",focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,clickEvent:"mousedown",handler:function(m,i){if(Ext.isGecko){j.execCmd("useCSS",false);j.execCmd("hilitecolor",i);j.execCmd("useCSS",true);j.deferFocus()}else{j.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+i:i);j.deferFocus()}this.up("menu").hide()}}]})})}if(j.enableAlignments){h.push("-",a("justifyleft"),a("justifycenter"),a("justifyright"))}if(!Ext.isSafari2){if(j.enableLinks){h.push("-",a("createlink",false,j.createLink))}if(j.enableLists){h.push("-",a("insertorderedlist"),a("insertunorderedlist"))}if(j.enableSourceEdit){h.push("-",a("sourceedit",true,function(i){j.toggleSourceEdit(!j.sourceEditMode)}))}}for(c=0;c<h.length;c++){if(h[c].itemId!=="sourceedit"){h[c].disabled=true}}k=Ext.widget("toolbar",{id:j.id+"-toolbar",ownerCt:j,cls:Ext.baseCSSPrefix+"html-editor-tb",enableOverflow:true,items:h,ownerLayout:j.getComponentLayout(),listeners:{click:function(i){i.preventDefault()},element:"el"}});j.toolbar=k},onDisable:function(){this.bodyEl.mask();this.callParent(arguments)},onEnable:function(){this.bodyEl.unmask();this.callParent(arguments)},setReadOnly:function(e){var d=this,c=d.textareaEl,b=d.iframeEl,a;d.readOnly=e;if(c){c.dom.readOnly=e}if(d.initialized){a=d.getEditorBody();if(Ext.isIE){b.setDisplayed(false);a.contentEditable=!e;b.setDisplayed(true)}else{d.setDesignMode(!e)}if(a){a.style.cursor=e?"default":"text"}d.disableItems(e)}},getDocMarkup:function(){var b=this,a=b.iframeEl.getHeight()-b.iframePad*2;return Ext.String.format('<html><head><style type="text/css">body{border:0;margin:0;padding:{0}px;height:{1}px;box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;cursor:text}</style></head><body></body></html>',b.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return(!Ext.isIE&&this.iframeEl.dom.contentDocument)||this.getWin().document},getWin:function(){return Ext.isIE?this.iframeEl.dom.contentWindow:window.frames[this.iframeEl.dom.name]},finishRenderChildren:function(){this.callParent();this.toolbar.finishRender()},onRender:function(){var a=this;a.callParent(arguments);a.inputEl=a.iframeEl;a.monitorTask=Ext.TaskManager.start({run:a.checkDesignMode,scope:a,interval:100})},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty("renderTpl")){a.renderTpl=a.getTpl("labelableRenderTpl")}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},getSubTplData:function(){return{$comp:this,cmpId:this.id,id:this.getInputId(),textareaCls:Ext.baseCSSPrefix+"hidden",value:this.value,iframeName:Ext.id(),iframeSrc:Ext.SSL_SECURE_URL,size:"height:100px;width:100%"}},getSubTplMarkup:function(){return this.getTpl("fieldSubTpl").apply(this.getSubTplData())},initFrameDoc:function(){var b=this,c,a;Ext.TaskManager.stop(b.monitorTask);c=b.getDoc();b.win=b.getWin();c.open();c.write(b.getDocMarkup());c.close();a={run:function(){var d=b.getDoc();if(d.body||d.readyState==="complete"){Ext.TaskManager.stop(a);b.setDesignMode(true);Ext.defer(b.initEditor,10,b)}},interval:10,duration:10000,scope:b};Ext.TaskManager.start(a)},checkDesignMode:function(){var a=this,b=a.getDoc();if(b&&(!b.editorInitialized||a.getDesignMode()!=="on")){a.initFrameDoc()}},setDesignMode:function(c){var a=this,b=a.getDoc();if(b){if(a.readOnly){c=false}b.designMode=(/on|true/i).test(String(c).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();return !a?"":String(a.designMode).toLowerCase()},disableItems:function(a){this.getToolbar().items.each(function(b){if(b.getItemId()!=="sourceedit"){b.setDisabled(a)}})},toggleSourceEdit:function(b){var g=this,d=g.iframeEl,a=g.textareaEl,e=Ext.baseCSSPrefix+"hidden",c=g.getToolbar().getComponent("sourceedit");if(!Ext.isBoolean(b)){b=!g.sourceEditMode}g.sourceEditMode=b;if(c.pressed!==b){c.toggle(b)}if(b){g.disableItems(true);g.syncValue();d.addCls(e);a.removeCls(e);a.dom.removeAttribute("tabIndex");a.focus();g.inputEl=a}else{if(g.initialized){g.disableItems(g.readOnly)}g.pushValue();d.removeCls(e);a.addCls(e);a.dom.setAttribute("tabIndex",-1);g.deferFocus();g.inputEl=d}g.fireEvent("editmodechange",g,b);g.doComponentLayout()},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!=="http://"){this.relayCmd("createlink",a)}},clearInvalid:Ext.emptyFn,setValue:function(c){var b=this,a=b.textareaEl;b.mixins.field.setValue.call(b,c);if(c===null||c===undefined){c=""}if(a){a.dom.value=c}b.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)===parseInt(this.defaultValue.replace(/\D/g,""),10)){a=a.substring(1)}return a},syncValue:function(){var g=this,b,h,e,a,d,c;if(g.initialized){b=g.getEditorBody();e=b.innerHTML;if(Ext.isWebKit){a=b.getAttribute("style");d=a.match(/text-align:(.*?);/i);if(d&&d[1]){e='<div style="'+d[0]+'">'+e+"</div>"}}e=g.cleanHtml(e);if(g.fireEvent("beforesync",g,e)!==false){if(g.textareaEl.dom.value!=e){g.textareaEl.dom.value=e;h=true}g.fireEvent("sync",g,e);if(h){g.checkChange()}}}},getValue:function(){var a=this,b;if(!a.sourceEditMode){a.syncValue()}b=a.rendered?a.textareaEl.dom.value:a.value;a.value=b;return b},pushValue:function(){var b=this,a;if(b.initialized){a=b.textareaEl.dom.value||"";if(!b.activated&&a.length<1){a=b.defaultValue}if(b.fireEvent("beforepush",b,a)!==false){b.getEditorBody().innerHTML=a;if(Ext.isGecko){b.setDesignMode(false);b.setDesignMode(true)}b.fireEvent("push",b,a)}}},deferFocus:function(){this.focus(false,true)},getFocusEl:function(){var a=this,b=a.win;return b&&!a.sourceEditMode?b:a.textareaEl},initEditor:function(){try{var g=this,d=g.getEditorBody(),b=g.textareaEl.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),i,c;b["background-attachment"]="fixed";d.bgProperties="fixed";Ext.DomHelper.applyStyles(d,b);i=g.getDoc();if(i){try{Ext.EventManager.removeAll(i)}catch(h){}}c=Ext.Function.bind(g.onEditorEvent,g);Ext.EventManager.on(i,{mousedown:c,dblclick:c,click:c,keyup:c,buffer:100});c=g.onRelayedEvent;Ext.EventManager.on(i,{mousedown:c,mousemove:c,mouseup:c,click:c,dblclick:c,scope:g});if(Ext.isGecko){Ext.EventManager.on(i,"keypress",g.applyCommand,g)}if(g.fixKeys){Ext.EventManager.on(i,"keydown",g.fixKeys,g)}Ext.EventManager.on(window,"unload",g.beforeDestroy,g);i.editorInitialized=true;g.initialized=true;g.pushValue();g.setReadOnly(g.readOnly);g.fireEvent("initialize",g)}catch(a){}},beforeDestroy:function(){var a=this,d=a.monitorTask,c,g;if(d){Ext.TaskManager.stop(d)}if(a.rendered){try{c=a.getDoc();if(c){Ext.EventManager.removeAll(c);for(g in c){if(c.hasOwnProperty(g)){delete c[g]}}}}catch(b){}Ext.destroyMembers(a,"toolbar","iframeEl","textareaEl")}a.callParent()},onRelayedEvent:function(c){var b=this.iframeEl,d=b.getXY(),a=c.getXY();c.xy=[d[0]+a[0],d[1]+a[1]];c.injectEvent(b);c.xy=a},onFirstFocus:function(){var c=this,b,a;c.activated=true;c.disableItems(c.readOnly);if(Ext.isGecko){c.win.focus();b=c.win.getSelection();if(!b.focusNode||b.focusNode.nodeType!==3){a=b.getRangeAt(0);a.selectNodeContents(c.getEditorBody());a.collapse(true);c.deferFocus()}try{c.execCmd("useCSS",true);c.execCmd("styleWithCSS",false)}catch(d){}}c.fireEvent("activate",c)},adjustFont:function(d){var e=d.getItemId()==="increasefontsize"?1:-1,c=this.getDoc().queryCommandValue("FontSize")||"2",a=Ext.isString(c)&&c.indexOf("px")!==-1,b;c=parseInt(c,10);if(a){if(c<=10){c=1+e}else{if(c<=13){c=2+e}else{if(c<=16){c=3+e}else{if(c<=18){c=4+e}else{if(c<=24){c=5+e}else{c=6+e}}}}}c=Ext.Number.constrain(c,1,6)}else{b=Ext.isSafari;if(b){e*=2}c=Math.max(1,c+e)+(b?"px":0)}this.execCmd("FontSize",c)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){var e=this,d,g,a,c;if(e.readOnly){return}if(!e.activated){e.onFirstFocus();return}d=e.getToolbar().items.map;g=e.getDoc();if(e.enableFont&&!Ext.isSafari2){a=(g.queryCommandValue("FontName")||e.defaultFont).toLowerCase();c=e.fontSelect.dom;if(a!==c.value){c.value=a}}function b(){for(var k=0,h=arguments.length,j;k<h;k++){j=arguments[k];d[j].toggle(g.queryCommandState(j))}}if(e.enableFormat){b("bold","italic","underline")}if(e.enableAlignments){b("justifyleft","justifycenter","justifyright")}if(!Ext.isSafari2&&e.enableLists){b("insertorderedlist","insertunorderedlist")}Ext.menu.Manager.hideAll();e.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){Ext.defer(function(){var c=this;c.focus();c.execCmd(b,a);c.updateToolbar()},10,this)},execCmd:function(d,c){var b=this,e=b.getDoc(),a;e.execCommand(d,false,c===a?null:c);b.syncValue()},applyCommand:function(d){if(d.ctrlKey){var a=this,g=d.getCharCode(),b;if(g>0){g=String.fromCharCode(g);switch(g){case"b":b="bold";break;case"i":b="italic";break;case"u":b="underline";break}if(b){a.win.focus();a.execCmd(b);a.deferFocus();d.preventDefault()}}}},insertAtCursor:function(c){var b=this,a;if(b.activated){b.win.focus();if(Ext.isIE){a=b.getDoc().selection.createRange();if(a){a.pasteHTML(c);b.syncValue();b.deferFocus()}}else{b.execCmd("InsertHTML",c);b.deferFocus()}}},fixKeys:function(){if(Ext.isIE){return function(h){var c=this,b=h.getKey(),g=c.getDoc(),a,d;if(b===h.TAB){h.stopEvent();a=g.selection.createRange();if(a){a.collapse(true);a.pasteHTML("&nbsp;&nbsp;&nbsp;&nbsp;");c.deferFocus()}}else{if(b===h.ENTER){a=g.selection.createRange();if(a){d=a.parentElement();if(!d||d.tagName.toLowerCase()!=="li"){h.stopEvent();a.pasteHTML("<br />");a.collapse(false);a.select()}}}}}}if(Ext.isOpera){return function(b){var a=this;if(b.getKey()===b.TAB){b.stopEvent();a.win.focus();a.execCmd("InsertHTML","&nbsp;&nbsp;&nbsp;&nbsp;");a.deferFocus()}}}if(Ext.isWebKit){return function(c){var b=this,a=c.getKey();if(a===c.TAB){c.stopEvent();b.execCmd("InsertText","\t");b.deferFocus()}else{if(a===c.ENTER){c.stopEvent();b.execCmd("InsertHtml","<br /><br />");b.deferFocus()}}}}return null}(),getToolbar:function(){return this.toolbar},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:Ext.baseCSSPrefix+"html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:Ext.baseCSSPrefix+"html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:Ext.baseCSSPrefix+"html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:Ext.baseCSSPrefix+"html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:Ext.baseCSSPrefix+"html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:Ext.baseCSSPrefix+"html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:Ext.baseCSSPrefix+"html-editor-tip"}}});Ext.define("Ext.panel.Tool",{extend:"Ext.Component",requires:["Ext.tip.QuickTipManager"],alias:"widget.tool",baseCls:Ext.baseCSSPrefix+"tool",disabledCls:Ext.baseCSSPrefix+"tool-disabled",toolPressedCls:Ext.baseCSSPrefix+"tool-pressed",toolOverCls:Ext.baseCSSPrefix+"tool-over",ariaRole:"button",childEls:["toolEl"],renderTpl:['<img id="{id}-toolEl" src="{blank}" class="{baseCls}-{type}" role="presentation"/>'],tooltipType:"qtip",stopEvent:true,height:15,width:15,initComponent:function(){var a=this;a.addEvents("click");a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.tooltip=a.tooltip||a.qtip;a.callParent();a.on({element:"toolEl",click:a.onClick,mousedown:a.onMouseDown,mouseover:a.onMouseOver,mouseout:a.onMouseOut,scope:a})},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType=="qtip"?"data-qtip":"title";b.toolEl.dom.setAttribute(a,b.tooltip)}}},getFocusEl:function(){return this.el},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+"-"+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent("click",b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define("Ext.toolbar.Paging",{extend:"Ext.toolbar.Toolbar",alias:"widget.pagingtoolbar",alternateClassName:"Ext.PagingToolbar",requires:["Ext.toolbar.TextItem","Ext.form.field.Number"],mixins:{bindable:"Ext.util.Bindable"},displayInfo:false,prependButtons:false,displayMsg:"Displaying {0} - {1} of {2}",emptyMsg:"No data to display",beforePageText:"Page",afterPageText:"of {0}",firstText:"First Page",prevText:"Previous Page",nextText:"Next Page",lastText:"Last Page",refreshText:"Refresh",inputItemWidth:30,getPagingItems:function(){var a=this;return[{itemId:"first",tooltip:a.firstText,overflowText:a.firstText,iconCls:Ext.baseCSSPrefix+"tbar-page-first",disabled:true,handler:a.moveFirst,scope:a},{itemId:"prev",tooltip:a.prevText,overflowText:a.prevText,iconCls:Ext.baseCSSPrefix+"tbar-page-prev",disabled:true,handler:a.movePrevious,scope:a},"-",a.beforePageText,{xtype:"numberfield",itemId:"inputItem",name:"inputItem",cls:Ext.baseCSSPrefix+"tbar-page-number",allowDecimals:false,minValue:1,hideTrigger:true,enableKeyEvents:true,keyNavEnabled:false,selectOnFocus:true,submitValue:false,isFormField:false,width:a.inputItemWidth,margins:"-1 2 3 2",listeners:{scope:a,keydown:a.onPagingKeyDown,blur:a.onPagingBlur}},{xtype:"tbtext",itemId:"afterTextItem",text:Ext.String.format(a.afterPageText,1)},"-",{itemId:"next",tooltip:a.nextText,overflowText:a.nextText,iconCls:Ext.baseCSSPrefix+"tbar-page-next",disabled:true,handler:a.moveNext,scope:a},{itemId:"last",tooltip:a.lastText,overflowText:a.lastText,iconCls:Ext.baseCSSPrefix+"tbar-page-last",disabled:true,handler:a.moveLast,scope:a},"-",{itemId:"refresh",tooltip:a.refreshText,overflowText:a.refreshText,iconCls:Ext.baseCSSPrefix+"tbar-loading",handler:a.doRefresh,scope:a}]},initComponent:function(){var b=this,c=b.getPagingItems(),a=b.items||b.buttons||[];if(b.prependButtons){b.items=a.concat(c)}else{b.items=c.concat(a)}delete b.buttons;if(b.displayInfo){b.items.push("->");b.items.push({xtype:"tbtext",itemId:"displayItem"})}b.callParent();b.addEvents("change","beforechange");b.on("beforerender",b.onLoad,b,{single:true});b.bindStore(b.store||"ext-empty-store",true)},updateInfo:function(){var e=this,c=e.child("#displayItem"),a=e.store,b=e.getPageData(),d,g;if(c){d=a.getCount();if(d===0){g=e.emptyMsg}else{g=Ext.String.format(e.displayMsg,b.fromRecord,b.toRecord,b.total)}c.setText(g);e.doComponentLayout()}},onLoad:function(){var g=this,d,b,c,a,e,h;e=g.store.getCount();h=e===0;if(!h){d=g.getPageData();b=d.currentPage;c=d.pageCount;a=Ext.String.format(g.afterPageText,isNaN(c)?1:c)}else{b=0;c=0;a=Ext.String.format(g.afterPageText,0)}g.child("#afterTextItem").setText(a);g.child("#inputItem").setDisabled(h).setValue(b);g.child("#first").setDisabled(b===1||h);g.child("#prev").setDisabled(b===1||h);g.child("#next").setDisabled(b===c||h);g.child("#last").setDisabled(b===c||h);g.child("#refresh").enable();g.updateInfo();if(g.rendered){g.fireEvent("change",g,d)}},getPageData:function(){var b=this.store,a=b.getTotalCount();return{total:a,currentPage:b.currentPage,pageCount:Math.ceil(a/b.pageSize),fromRecord:((b.currentPage-1)*b.pageSize)+1,toRecord:Math.min(b.currentPage*b.pageSize,a)}},onLoadError:function(){if(!this.rendered){return}this.child("#refresh").enable()},readPageFromInput:function(b){var a=this.child("#inputItem").getValue(),c=parseInt(a,10);if(!a||isNaN(c)){this.child("#inputItem").setValue(b.currentPage);return false}return c},onPagingFocus:function(){this.child("#inputItem").select()},onPagingBlur:function(b){var a=this.getPageData().currentPage;this.child("#inputItem").setValue(a)},onPagingKeyDown:function(i,h){var d=this,b=h.getKey(),c=d.getPageData(),a=h.shiftKey?10:1,g;if(b==h.RETURN){h.stopEvent();g=d.readPageFromInput(c);if(g!==false){g=Math.min(Math.max(1,g),c.pageCount);if(d.fireEvent("beforechange",d,g)!==false){d.store.loadPage(g)}}}else{if(b==h.HOME||b==h.END){h.stopEvent();g=b==h.HOME?1:c.pageCount;i.setValue(g)}else{if(b==h.UP||b==h.PAGE_UP||b==h.DOWN||b==h.PAGE_DOWN){h.stopEvent();g=d.readPageFromInput(c);if(g){if(b==h.DOWN||b==h.PAGE_DOWN){a*=-1}g+=a;if(g>=1&&g<=c.pageCount){i.setValue(g)}}}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},moveFirst:function(){if(this.fireEvent("beforechange",this,1)!==false){this.store.loadPage(1)}},movePrevious:function(){var b=this,a=b.store.currentPage-1;if(a>0){if(b.fireEvent("beforechange",b,a)!==false){b.store.previousPage()}}},moveNext:function(){var c=this,b=c.getPageData().pageCount,a=c.store.currentPage+1;if(a<=b){if(c.fireEvent("beforechange",c,a)!==false){c.store.nextPage()}}},moveLast:function(){var b=this,a=b.getPageData().pageCount;if(b.fireEvent("beforechange",b,a)!==false){b.store.loadPage(a)}},doRefresh:function(){var a=this,b=a.store.currentPage;if(a.fireEvent("beforechange",a,b)!==false){a.store.loadPage(b)}},getStoreListeners:function(){return{beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError}},unbind:function(a){this.bindStore(null)},bind:function(a){this.bindStore(a)},onDestroy:function(){this.unbind();this.callParent()}});Ext.define("Ext.tree.Column",{extend:"Ext.grid.column.Column",alias:"widget.treecolumn",tdCls:Ext.baseCSSPrefix+"grid-cell-treecolumn",initComponent:function(){var a=this.renderer||this.defaultRenderer,b=this.scope||window;this.renderer=function(m,o,e,d,l,h,k){var s=[],q=Ext.String.format,u=e.getDepth(),r=Ext.baseCSSPrefix+"tree-",g=r+"elbow-",n=r+"expander",j='<img src="{1}" class="{0}" />',v='<input type="button" role="checkbox" class="{0}" {1} />',i=a.apply(b,arguments),p=e.get("href"),t=e.get("hrefTarget"),c=e.get("cls");while(e){if(!e.isRoot()||(e.isRoot()&&k.rootVisible)){if(e.getDepth()===u){s.unshift(q(j,r+"icon "+r+"icon"+(e.get("icon")?"-inline ":(e.isLeaf()?"-leaf ":"-parent "))+(e.get("iconCls")||""),e.get("icon")||Ext.BLANK_IMAGE_URL));if(e.get("checked")!==null){s.unshift(q(v,(r+"checkbox")+(e.get("checked")?" "+r+"checkbox-checked":""),e.get("checked")?'aria-checked="true"':""));if(e.get("checked")){o.tdCls+=(" "+r+"checked")}}if(e.isLast()){if(e.isExpandable()){s.unshift(q(j,(g+"end-plus "+n),Ext.BLANK_IMAGE_URL))}else{s.unshift(q(j,(g+"end"),Ext.BLANK_IMAGE_URL))}}else{if(e.isExpandable()){s.unshift(q(j,(g+"plus "+n),Ext.BLANK_IMAGE_URL))}else{s.unshift(q(j,(r+"elbow"),Ext.BLANK_IMAGE_URL))}}}else{if(e.isLast()||e.getDepth()===0){s.unshift(q(j,(g+"empty"),Ext.BLANK_IMAGE_URL))}else{if(e.getDepth()!==0){s.unshift(q(j,(g+"line"),Ext.BLANK_IMAGE_URL))}}}}e=e.parentNode}if(p){s.push('<a href="',p,'" target="',t,'">',i,"</a>")}else{s.push(i)}if(c){o.tdCls+=" "+c}return s.join("")};this.callParent(arguments)},defaultRenderer:function(a){return a}});Ext.define("Ext.view.DragZone",{extend:"Ext.dd.DragZone",containerScroll:false,constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el.dom.parentNode]);b.ddel=Ext.get(document.createElement("div"));b.ddel.addCls(Ext.baseCSSPrefix+"grid-dd-wrap")},init:function(c,a,b){this.initTarget(c,a,b);this.view.mon(this.view,{itemmousedown:this.onItemMouseDown,scope:this})},onItemMouseDown:function(b,a,d,c,g){if(!this.isPreventDrag(g,a,d,c)){this.handleMouseDown(g);if(b.getSelectionModel().selectionMode=="MULTI"&&!g.ctrlKey&&b.getSelectionModel().isSelected(a)){return false}}},isPreventDrag:function(a){return false},getDragData:function(h){var c=this.view,g=h.getTarget(c.getItemSelector()),b,a,d;if(g){b=c.getRecord(g);a=c.getSelectionModel();d=a.getSelection();return{copy:this.view.copy||(this.view.allowCopy&&h.ctrlKey),event:new Ext.EventObjectImpl(h),view:c,ddel:this.ddel,item:g,records:d,fromPosition:Ext.fly(g).getXY()}}},onInitDrag:function(b,j){var g=this,h=g.dragData,d=h.view,a=d.getSelectionModel(),c=d.getRecord(h.item),i=h.event;if(!a.isSelected(c)||i.hasModifier()){a.selectWithEvent(c,i,true)}h.records=a.getSelection();g.ddel.update(g.getDragText());g.proxy.update(g.ddel.dom);g.onStartDrag(b,j);return true},getDragText:function(){var a=this.dragData.records.length;return Ext.String.format(this.dragText,a,a==1?"":"s")},getRepairXY:function(b,a){return a?a.fromPosition:false}});Ext.define("Ext.tree.ViewDragZone",{extend:"Ext.view.DragZone",isPreventDrag:function(b,a){return(a.get("allowDrag")===false)||!!b.getTarget(this.view.expanderSelector)},afterRepair:function(){var d=this,a=d.view,e=a.selectedItemCls,b=d.dragData.records,c=Ext.fly;if(Ext.enableFx&&d.repairHighlight){Ext.Array.forEach(b,function(g){var h=a.getNode(g);c(h.firstChild).highlight(d.repairHighlightColor,{listeners:{beforeanimate:function(){if(a.isSelected(h)){c(h).removeCls(e)}},afteranimate:function(){if(a.isSelected(h)){c(h).addCls(e)}}}})})}d.dragging=false}});Ext.define("Ext.view.DropZone",{extend:"Ext.dd.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",constructor:function(a){var b=this;Ext.apply(b,a);if(!b.ddGroup){b.ddGroup="view-dd-zone-"+b.view.id}b.callParent([b.view.el])},fireViewEvent:function(){var b=this,a;b.lock();a=b.view.fireEvent.apply(b.view,arguments);b.unlock();return a},getTargetFromEvent:function(k){var j=k.getTarget(this.view.getItemSelector()),d,c,b,g,a,h;if(!j){d=k.getPageY();for(g=0,c=this.view.getNodes(),a=c.length;g<a;g++){b=c[g];h=Ext.fly(b).getBox();if(d<=h.bottom){return b}}}return j},getIndicator:function(){var a=this;if(!a.indicator){a.indicator=new Ext.Component({html:a.indicatorHtml,cls:a.indicatorCls,ownerCt:a.view,floating:true,shadow:false})}return a.indicator},getPosition:function(c,a){var g=c.getXY()[1],b=Ext.fly(a).getRegion(),d;if((b.bottom-g)>=(b.bottom-b.top)/2){d="before"}else{d="after"}return d},containsRecordAtOffset:function(d,b,g){if(!b){return false}var a=this.view,c=a.indexOf(b),e=a.getNode(c+g),h=e?a.getRecord(e):null;return h&&Ext.Array.contains(d,h)},positionIndicator:function(b,c,d){var g=this,i=g.view,h=g.getPosition(d,b),k=i.getRecord(b),a=c.records,j;if(!Ext.Array.contains(a,k)&&(h=="before"&&!g.containsRecordAtOffset(a,k,-1)||h=="after"&&!g.containsRecordAtOffset(a,k,1))){g.valid=true;if(g.overRecord!=k||g.currentPosition!=h){j=Ext.fly(b).getY()-i.el.getY()-1;if(h=="after"){j+=Ext.fly(b).getHeight()}g.getIndicator().setWidth(Ext.fly(i.el).getWidth()).showAt(0,j);g.overRecord=k;g.currentPosition=h}}else{g.invalidateDrop()}},invalidateDrop:function(){if(this.valid){this.valid=false;this.getIndicator().hide()}},onNodeOver:function(c,a,g,d){var b=this;if(!Ext.Array.contains(d.records,b.view.getRecord(c))){b.positionIndicator(c,d,g)}return b.valid?b.dropAllowed:b.dropNotAllowed},notifyOut:function(c,a,g,d){var b=this;b.callParent(arguments);delete b.overRecord;delete b.currentPosition;if(b.indicator){b.indicator.hide()}},onContainerOver:function(a,h,g){var d=this,b=d.view,c=b.store.getCount();if(c){d.positionIndicator(b.getNode(c-1),g,h)}else{delete d.overRecord;delete d.currentPosition;d.getIndicator().setWidth(Ext.fly(b.el).getWidth()).showAt(0,0);d.valid=true}return d.dropAllowed},onContainerDrop:function(a,c,b){return this.onNodeDrop(a,null,c,b)},onNodeDrop:function(g,a,i,h){var d=this,c=false,b={wait:false,processDrop:function(){d.invalidateDrop();d.handleNodeDrop(h,d.overRecord,d.currentPosition);c=true;d.fireViewEvent("drop",g,h,d.overRecord,d.currentPosition)},cancelDrop:function(){d.invalidateDrop();c=true}},j=false;if(d.valid){j=d.fireViewEvent("beforedrop",g,h,d.overRecord,d.currentPosition,b);if(b.wait){return}if(j!==false){if(!c){b.processDrop()}}}return j},destroy:function(){Ext.destroy(this.indicator);delete this.indicator;this.callParent()}});Ext.define("Ext.grid.ViewDropZone",{extend:"Ext.view.DropZone",indicatorHtml:'<div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-left"></div><div class="'+Ext.baseCSSPrefix+'grid-drop-indicator-right"></div>',indicatorCls:Ext.baseCSSPrefix+"grid-drop-indicator",handleNodeDrop:function(b,d,e){var j=this.view,k=j.getStore(),h,a,c,g;if(b.copy){a=b.records;b.records=[];for(c=0,g=a.length;c<g;c++){b.records.push(a[c].copy(a[c].getId()))}}else{b.view.store.remove(b.records,b.view===j)}h=k.indexOf(d);if(e!=="before"){h++}k.insert(h,b.records);j.getSelectionModel().select(b.records)}});Ext.define("Ext.tree.ViewDropZone",{extend:"Ext.view.DropZone",allowParentInserts:false,allowContainerDrops:false,appendOnly:false,expandDelay:500,indicatorCls:Ext.baseCSSPrefix+"tree-ddindicator",expandNode:function(b){var a=this.view;if(!b.isLeaf()&&!b.isExpanded()){a.expand(b);this.expandProcId=false}},queueExpand:function(a){this.expandProcId=Ext.Function.defer(this.expandNode,this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},getPosition:function(g,b){var j=this.view,c=j.getRecord(b),h=g.getPageY(),k=c.isLeaf(),a=false,i=Ext.fly(b).getRegion(),d;if(c.isRoot()){return"append"}if(this.appendOnly){return k?false:"append"}if(!this.allowParentInsert){a=c.hasChildNodes()&&c.isExpanded()}d=(i.bottom-i.top)/(k?2:3);if(h>=i.top&&h<(i.top+d)){return"before"}else{if(!a&&(k||(h>=(i.bottom-d)&&h<=i.bottom))){return"after"}else{return"append"}}},isValidDropPoint:function(b,j,n,k,g){if(!b||!g.item){return false}var o=this.view,l=o.getRecord(b),d=g.records,a=d.length,m=d.length,c,h;if(!(l&&j&&a)){return false}for(c=0;c<m;c++){h=d[c];if(h.isNode&&h.contains(l)){return false}}if(j==="append"&&l.get("allowDrop")===false){return false}else{if(j!="append"&&l.parentNode.get("allowDrop")===false){return false}}if(Ext.Array.contains(d,l)){return false}return true},onNodeOver:function(a,i,g,c){var d=this.getPosition(g,a),b=this.dropNotAllowed,j=this.view,h=j.getRecord(a),k=this.getIndicator(),m=0,l=0;this.cancelExpand();if(d=="append"&&!this.expandProcId&&!Ext.Array.contains(c.records,h)&&!h.isLeaf()&&!h.isExpanded()){this.queueExpand(h)}if(this.isValidDropPoint(a,d,i,g,c)){this.valid=true;this.currentPosition=d;this.overRecord=h;k.setWidth(Ext.fly(a).getWidth());l=Ext.fly(a).getY()-Ext.fly(j.el).getY()-1;if(d=="before"){b=h.isFirst()?Ext.baseCSSPrefix+"tree-drop-ok-above":Ext.baseCSSPrefix+"tree-drop-ok-between";k.showAt(0,l);i.proxy.show()}else{if(d=="after"){b=h.isLast()?Ext.baseCSSPrefix+"tree-drop-ok-below":Ext.baseCSSPrefix+"tree-drop-ok-between";l+=Ext.fly(a).getHeight();k.showAt(0,l);i.proxy.show()}else{b=Ext.baseCSSPrefix+"tree-drop-ok-append";k.hide()}}}else{this.valid=false}this.currentCls=b;return b},onContainerOver:function(a,c,b){return c.getTarget("."+this.indicatorCls)?this.currentCls:this.dropNotAllowed},notifyOut:function(){this.callParent(arguments);this.cancelExpand()},handleNodeDrop:function(d,l,e){var n=this,o=n.view,g=l.parentNode,p=o.getStore(),r=[],a,c,k,b,j,m,q,h;if(d.copy){a=d.records;d.records=[];for(c=0,k=a.length;c<k;c++){d.records.push(Ext.apply({},a[c].data))}}n.cancelExpand();if(e=="before"){b=g.insertBefore;j=[null,l];l=g}else{if(e=="after"){if(l.nextSibling){b=g.insertBefore;j=[null,l.nextSibling]}else{b=g.appendChild;j=[null]}l=g}else{if(!l.isExpanded()){m=true}b=l.appendChild;j=[null]}}q=function(){var i;for(c=0,k=d.records.length;c<k;c++){j[0]=d.records[c];i=b.apply(l,j);if(Ext.enableFx&&n.dropHighlight){r.push(o.getNode(i))}}if(Ext.enableFx&&n.dropHighlight){Ext.Array.forEach(r,function(s){if(s){Ext.fly(s.firstChild?s.firstChild:s).highlight(n.dropHighlightColor)}})}};if(m){l.expand(false,q)}else{q()}}});Ext.define("Ext.view.TableChunker",{singleton:true,requires:["Ext.XTemplate"],metaTableTpl:["{[this.openTableWrap()]}",'<table class="'+Ext.baseCSSPrefix+"grid-table "+Ext.baseCSSPrefix+'grid-table-resizer" border="0" cellspacing="0" cellpadding="0" {[this.embedFullWidth(values)]}>',"<tbody>",'<tr class="'+Ext.baseCSSPrefix+'grid-header-row">','<tpl for="columns">','<th class="'+Ext.baseCSSPrefix+'grid-col-resizer-{id}" style="width: {width}px; height: 0px;"></th>',"</tpl>","</tr>","{[this.openRows()]}","{row}",'<tpl for="features">',"{[this.embedFeature(values, parent, xindex, xcount)]}","</tpl>","{[this.closeRows()]}","</tbody>","</table>","{[this.closeTableWrap()]}"],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c="";if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(b){var a='style="width:{fullWidth}px;';if(!b.rowCount){a+="height:1px;"}return a+'"'},openRows:function(){return'<tpl for="rows">'},closeRows:function(){return"</tpl>"},metaRowTpl:['<tr class="'+Ext.baseCSSPrefix+'grid-row {[this.embedRowCls()]}" {[this.embedRowAttr()]}>','<tpl for="columns">','<td class="{cls} '+Ext.baseCSSPrefix+"grid-cell "+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}" {{id}-tdAttr}>','<div{[parent.enableTextSelection ? "" : " unselectable=\'on\'"]} class="'+Ext.baseCSSPrefix+'grid-cell-inner{[parent.enableTextSelection ? "" : " '+Ext.baseCSSPrefix+'unselectable"]}" style="text-align: {align}; {{id}-style};">{{id}}</div>',"</td>","</tpl>","</tr>"],firstOrLastCls:function(b,c){var a="";if(b===1){a=Ext.baseCSSPrefix+"grid-cell-first"}else{if(b===c){a=Ext.baseCSSPrefix+"grid-cell-last"}}return a},embedRowCls:function(){return"{rowCls}"},embedRowAttr:function(){return"{rowAttr}"},openTableWrap:function(){return""},closeTableWrap:function(){return""},getTableTpl:function(k,b){var j,h={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},g={},c=k.features||[],m=c.length,e=0,l={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e<m;e++){if(!c[e].disabled){c[e].mutateMetaRowTpl(d);Ext.apply(l,c[e].getMetaRowTplFragments());Ext.apply(g,c[e].getFragmentTpl());Ext.apply(h,c[e].getTableFragments())}}d=new Ext.XTemplate(d.join(""),l);k.row=d.applyTemplate(k);a=new Ext.XTemplate(this.metaTableTpl.join(""),h);j=a.applyTemplate(k);if(!b){j=new Ext.XTemplate(j,g)}return j}});Ext.define("Ext.view.View",{extend:"Ext.view.AbstractView",alternateClassName:"Ext.DataView",alias:"widget.dataview",inheritableStatics:{EventMap:{mousedown:"MouseDown",mouseup:"MouseUp",click:"Click",dblclick:"DblClick",contextmenu:"ContextMenu",mouseover:"MouseOver",mouseout:"MouseOut",mouseenter:"MouseEnter",mouseleave:"MouseLeave",keydown:"KeyDown",focus:"Focus"}},addCmpEvents:function(){this.addEvents("beforeitemmousedown","beforeitemmouseup","beforeitemmouseenter","beforeitemmouseleave","beforeitemclick","beforeitemdblclick","beforeitemcontextmenu","beforeitemkeydown","itemmousedown","itemmouseup","itemmouseenter","itemmouseleave","itemclick","itemdblclick","itemcontextmenu","itemkeydown","beforecontainermousedown","beforecontainermouseup","beforecontainermouseover","beforecontainermouseout","beforecontainerclick","beforecontainerdblclick","beforecontainercontextmenu","beforecontainerkeydown","containermouseup","containermouseover","containermouseout","containerclick","containerdblclick","containercontextmenu","containerkeydown","selectionchange","beforeselect","highlightitem","unhighlightitem")},getFocusEl:function(){return this.getTargetEl()},afterRender:function(){var b=this,a;b.callParent();a={scope:b,freezeEvent:true,click:b.handleEvent,mousedown:b.handleEvent,mouseup:b.handleEvent,dblclick:b.handleEvent,contextmenu:b.handleEvent,mouseover:b.handleEvent,mouseout:b.handleEvent,keydown:b.handleEvent};b.mon(b.getTargetEl(),a);if(b.store){b.bindStore(b.store,true)}},handleEvent:function(a){if(this.processUIEvent(a)!==false){this.processSpecialEvent(a)}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(b,a){var c;if(a&&typeof(a.offsetParent)==="object"){c=(b.type=="mouseout")?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(h){var i=this,k=h.getTarget(i.getItemSelector(),i.getTargetEl()),a=this.statics().EventMap,g,c,j=h.type,d=i.mouseOverItem,b;if(!k){if(j=="mouseover"&&i.stillOverItem(h,d)){k=d}if(j=="keydown"){c=i.getSelectionModel().getLastSelected();if(c){k=i.getNode(c)}}}if(k){g=i.indexOf(k);if(!c){c=i.getRecord(k)}if(i.processItemEvent(c,k,g,h)===false){return false}b=i.isNewItemEvent(k,h);if(b===false){return false}if((i["onBeforeItem"+a[b]](c,k,g,h)===false)||(i.fireEvent("beforeitem"+b,i,c,k,g,h)===false)||(i["onItem"+a[b]](c,k,g,h)===false)){return false}i.fireEvent("item"+b,i,c,k,g,h)}else{if((i.processContainerEvent(h)===false)||(i["onBeforeContainer"+a[j]](h)===false)||(i.fireEvent("beforecontainer"+j,i,h)===false)||(i["onContainer"+a[j]](h)===false)){return false}i.fireEvent("container"+j,i,h)}return true},isNewItemEvent:function(d,g){var c=this,a=c.mouseOverItem,b=g.type;switch(b){case"mouseover":if(d===a){return false}c.mouseOverItem=d;return"mouseenter";case"mouseout":if(c.stillOverItem(g,a)){return false}c.mouseOverItem=null;return"mouseleave"}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(b){var a=this;a.clearHighlight();a.highlightedItem=b;Ext.fly(b).addCls(a.overItemCls);a.fireEvent("highlightitem",a,b)},clearHighlight:function(){var b=this,a=b.highlightedItem;if(a){Ext.fly(a).removeCls(b.overItemCls);b.fireEvent("unhighlightitem",b,a);delete b.highlightedItem}},onUpdate:function(b,a){var g=this,e=g.getNode(a),c=g.callParent(arguments),d=g.highlightedItem;if(d&&d===e){delete g.highlightedItem;if(c){g.highlightItem(c)}}},refresh:function(){this.clearHighlight();this.callParent(arguments);this.refreshHeight()},refreshHeight:function(){var a=this.getSizeModel();if(a.height.shrinkWrap){this.updateLayout()}}});Ext.define("Ext.view.BoundList",{extend:"Ext.view.View",alias:"widget.boundlist",alternateClassName:"Ext.BoundList",requires:["Ext.layout.component.BoundList","Ext.toolbar.Paging"],pageSize:0,baseCls:Ext.baseCSSPrefix+"boundlist",itemCls:Ext.baseCSSPrefix+"boundlist-item",listItemCls:"",shadow:false,trackOver:true,refreshed:0,deferInitialRefresh:false,componentLayout:"boundlist",childEls:["listEl"],renderTpl:['<div id="{id}-listEl" class="{baseCls}-list-ct" style="overflow:auto"></div>{%this.renderToolbar(out, values)%}',{disableFormats:true,renderToolbar:function(b,a){var c=a.$comp;if(c.pagingToolbar){c.pagingToolbar.ownerLayout=c.componentLayout;Ext.DomHelper.generateMarkup(c.pagingToolbar.getRenderTree(),b)}}}],initComponent:function(){var b=this,a=b.baseCls,c=b.itemCls;b.selectedItemCls=a+"-selected";b.overItemCls=a+"-item-over";b.itemSelector="."+c;if(b.floating){b.addCls(a+"-floating")}if(!b.tpl){b.tpl=new Ext.XTemplate('<ul><tpl for=".">','<li role="option" class="'+c+'">'+b.getInnerTpl(b.displayField)+"</li>","</tpl></ul>")}else{if(Ext.isString(b.tpl)){b.tpl=new Ext.XTemplate(b.tpl)}}if(b.pageSize){b.pagingToolbar=b.createPagingToolbar()}b.callParent()},up:function(b){var a=this.pickerField;if(b){for(;a;a=a.ownerCt){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},createPagingToolbar:function(){return Ext.widget("pagingtoolbar",{id:this.id+"-paging-toolbar",pageSize:this.pageSize,store:this.store,border:false})},finishRenderChildren:function(){var a=this.pagingToolbar;this.callParent(arguments);if(a){a.finishRender()}},refresh:function(){var b=this,a=b.pagingToolbar;b.callParent();if(b.rendered&&a&&!b.preserveScrollOnRefresh){b.el.appendChild(a.el)}},bindStore:function(a,b){var c=this.pagingToolbar;this.callParent(arguments);if(c){c.bindStore(this.store,b)}},getTargetEl:function(){return this.listEl||this.el},getInnerTpl:function(a){return"{"+a+"}"},onDestroy:function(){Ext.destroyMembers(this,"pagingToolbar","listEl");this.callParent()}});Ext.define("Ext.picker.Time",{extend:"Ext.view.BoundList",alias:"widget.timepicker",requires:["Ext.data.Store","Ext.Date"],increment:15,format:"g:i A",displayField:"disp",initDate:[2008,0,1],componentCls:Ext.baseCSSPrefix+"timepicker",loadMask:false,initComponent:function(){var c=this,a=Ext.Date,b=a.clearTime,d=c.initDate;c.absMin=b(new Date(d[0],d[1],d[2]));c.absMax=a.add(b(new Date(d[0],d[1],d[2])),"mi",(24*60)-1);c.store=c.createStore();c.updateList();c.callParent()},setMinValue:function(a){this.minValue=a;this.updateList()},setMaxValue:function(a){this.maxValue=a;this.updateList()},normalizeDate:function(a){var b=this.initDate;a.setFullYear(b[0],b[1],b[2]);return a},updateList:function(){var c=this,b=c.normalizeDate(c.minValue||c.absMin),a=c.normalizeDate(c.maxValue||c.absMax);c.store.filterBy(function(d){var e=d.get("date");return e>=b&&e<=a})},createStore:function(){var d=this,c=Ext.Date,e=[],b=d.absMin,a=d.absMax;while(b<=a){e.push({disp:c.dateFormat(b,d.format),date:b});b=c.add(b,"mi",d.increment)}return new Ext.data.Store({fields:["disp","date"],data:e})}});Ext.define("Ext.view.BoundListKeyNav",{extend:"Ext.util.KeyNav",requires:"Ext.view.BoundList",constructor:function(b,a){var c=this;c.boundList=a.boundList;c.callParent([b,Ext.apply({},a,c.defaultHandlers)])},defaultHandlers:{up:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c>0?c-1:d.getCount()-1;e.highlightAt(a)},down:function(){var e=this,b=e.boundList,d=b.all,g=b.highlightedItem,c=g?b.indexOf(g):-1,a=c<d.getCount()-1?c+1:0;e.highlightAt(a)},pageup:function(){},pagedown:function(){},home:function(){this.highlightAt(0)},end:function(){var a=this;a.highlightAt(a.boundList.all.getCount()-1)},enter:function(a){this.selectHighlighted(a)}},highlightAt:function(b){var a=this.boundList,c=a.all.item(b);if(c){c=c.dom;a.highlightItem(c);a.getTargetEl().scrollChildIntoView(c,false)}},selectHighlighted:function(g){var d=this,b=d.boundList,c=b.highlightedItem,a=b.getSelectionModel();if(c){a.selectWithEvent(b.getRecord(c),g)}}});Ext.define("Ext.form.field.ComboBox",{extend:"Ext.form.field.Picker",requires:["Ext.util.DelayedTask","Ext.EventObject","Ext.view.BoundList","Ext.view.BoundListKeyNav","Ext.data.StoreManager"],alternateClassName:"Ext.form.ComboBox",alias:["widget.combobox","widget.combo"],mixins:{bindable:"Ext.util.Bindable"},triggerCls:Ext.baseCSSPrefix+"form-arrow-trigger",hiddenName:"",hiddenDataCls:Ext.baseCSSPrefix+"hide-display "+Ext.baseCSSPrefix+"form-data-hidden",fieldSubTpl:['<div class="{hiddenDataCls}" role="presentation"></div>','<input id="{id}" type="{type}" {inputAttrTpl}','<tpl if="value"> value="{value}"</tpl>','<tpl if="name"> name="{name}"</tpl>','<tpl if="placeholder"> placeholder="{placeholder}"</tpl>','<tpl if="size"> size="{size}"</tpl>','<tpl if="maxLength !== undefined"> maxlength="{maxLength}"</tpl>','<tpl if="readOnly"> readonly="readonly"</tpl>','<tpl if="disabled"> disabled="disabled"</tpl>','<tpl if="tabIdx"> tabIndex="{tabIdx}"</tpl>','<tpl if="fieldStyle"> style="{fieldStyle}"</tpl>','class="{fieldCls} {typeCls}" autocomplete="off" />',{compiled:true,disableFormats:true}],getSubTplData:function(){var a=this;Ext.applyIf(a.subTplData,{hiddenDataCls:a.hiddenDataCls});return a.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);a.setHiddenValue(a.value)},multiSelect:false,delimiter:", ",displayField:"text",triggerAction:"all",allQuery:"",queryParam:"query",queryMode:"remote",queryCaching:true,pageSize:0,autoSelect:true,typeAhead:false,typeAheadDelay:250,selectOnTab:true,forceSelection:false,defaultListConfig:{loadingHeight:70,minWidth:70,maxHeight:300,shadow:"sides"},ignoreSelection:0,initComponent:function(){var e=this,c=Ext.isDefined,b=e.store,d=e.transform,a,g;Ext.applyIf(e.renderSelectors,{hiddenDataEl:"."+e.hiddenDataCls.split(" ").join(".")});this.addEvents("beforequery","select","beforeselect","beforedeselect");if(d){a=Ext.getDom(d);if(a){if(!e.store){b=Ext.Array.map(Ext.Array.from(a.options),function(h){return[h.value,h.text]})}if(!e.name){e.name=a.name}if(!("value" in e)){e.value=a.value}}}e.bindStore(b||"ext-empty-store",true);b=e.store;if(b.autoCreated){e.queryMode="local";e.valueField=e.displayField="field1";if(!b.expanded){e.displayField="field2"}}if(!c(e.valueField)){e.valueField=e.displayField}g=e.queryMode==="local";if(!c(e.queryDelay)){e.queryDelay=g?10:500}if(!c(e.minChars)){e.minChars=g?0:4}if(!e.displayTpl){e.displayTpl=new Ext.XTemplate('<tpl for=".">{[typeof values === "string" ? values : values["'+e.displayField+'"]]}<tpl if="xindex < xcount">'+e.delimiter+"</tpl></tpl>")}else{if(Ext.isString(e.displayTpl)){e.displayTpl=new Ext.XTemplate(e.displayTpl)}}e.callParent();e.doQueryTask=new Ext.util.DelayedTask(e.doRawQuery,e);if(e.store.getCount()>0){e.setValue(e.value)}if(a){e.render(a.parentNode,a);Ext.removeNode(a);delete e.renderTo}},getStore:function(){return this.store},beforeBlur:function(){this.doQueryTask.cancel();this.assertValue()},assertValue:function(){var a=this,b=a.getRawValue(),c;if(a.forceSelection){if(a.multiSelect){if(b!==a.getDisplayValue()){a.setValue(a.lastSelection)}}else{c=a.findRecordByDisplay(b);if(c){a.select(c)}else{a.setValue(a.lastSelection)}}}a.collapse()},onTypeAhead:function(){var e=this,d=e.displayField,b=e.store.findRecord(d,e.getRawValue()),c=e.getPicker(),g,a,h;if(b){g=b.get(d);a=g.length;h=e.getRawValue().length;c.highlightItem(c.getNode(b));if(h!==0&&h!==a){e.setRawValue(g);e.selectText(h,g.length)}}},resetToDefault:function(){},onUnbindStore:function(a){var b=this.picker;if(!a&&b){b.bindStore(null)}},onBindStore:function(a,c){var b=this.picker;if(!c){this.resetToDefault()}if(b){b.bindStore(a)}},getStoreListeners:function(){return{beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.onException}},onBeforeLoad:function(){++this.ignoreSelection},onException:function(){--this.ignoreSelection;this.collapse()},onLoad:function(){var a=this,b=a.value;--a.ignoreSelection;if(a.rawQuery){a.rawQuery=false;a.syncSelection();if(a.picker&&!a.picker.getSelectionModel().hasSelection()){a.doAutoSelect()}}else{if(a.value){a.setValue(a.value)}else{if(a.store.getCount()){a.doAutoSelect()}else{a.setValue("")}}}},doRawQuery:function(){this.doQuery(this.getRawValue(),false,true)},doQuery:function(h,c,e){h=h||"";var d=this,b={query:h,forceAll:c,combo:d,cancel:false},a=d.store,g=d.queryMode==="local";if(d.fireEvent("beforequery",b)===false||b.cancel){return false}h=b.query;c=b.forceAll;if(c||(h.length>=d.minChars)){d.expand();if(!d.queryCaching||d.lastQuery!==h){d.lastQuery=h;if(g){if(c){a.clearFilter()}else{a.clearFilter(true);a.filter(d.displayField,h)}}else{d.rawQuery=e;if(d.pageSize){d.loadPage(1)}else{a.load({params:d.getParams(h)})}}}if(d.getRawValue()!==d.getDisplayValue()){d.ignoreSelection++;d.picker.getSelectionModel().deselectAll();d.ignoreSelection--}if(g){d.doAutoSelect()}if(d.typeAhead){d.doTypeAhead()}}return true},loadPage:function(a){this.store.loadPage(a,{params:this.getParams(this.lastQuery)})},onPageChange:function(b,a){this.loadPage(a);return false},getParams:function(c){var b={},a=this.queryParam;if(a){b[a]=c}return b},doAutoSelect:function(){var b=this,a=b.picker,c,d;if(a&&b.autoSelect&&b.store.getCount()>0){c=a.getSelectionModel().lastSelected;d=a.getNode(c||0);if(d){a.highlightItem(d);a.listEl.scrollChildIntoView(d,false)}}},doTypeAhead:function(){if(!this.typeAheadTask){this.typeAheadTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.typeAheadTask.delay(this.typeAheadDelay)}},onTriggerClick:function(){var a=this;if(!a.readOnly&&!a.disabled){if(a.isExpanded){a.collapse()}else{a.onFocus({});if(a.triggerAction==="all"){a.doQuery(a.allQuery,true)}else{a.doQuery(a.getRawValue(),false,true)}}a.inputEl.focus()}},onKeyUp:function(d,b){var c=this,a=d.getKey();if(!c.readOnly&&!c.disabled&&c.editable){c.lastKey=a;if(!d.isSpecialKey()||a==d.BACKSPACE||a==d.DELETE){c.doQueryTask.delay(c.queryDelay)}}if(c.enableKeyEvents){c.callParent(arguments)}},initEvents:function(){var a=this;a.callParent();if(!a.enableKeyEvents){a.mon(a.inputEl,"keyup",a.onKeyUp,a)}},onDestroy:function(){this.bindStore(null);this.callParent()},onAdded:function(){var a=this;a.callParent(arguments);if(a.picker){a.picker.ownerCt=a.up("[floating]");a.picker.registerWithOwnerCt()}},createPicker:function(){var c=this,a,d=Ext.baseCSSPrefix+"menu",b=Ext.apply({pickerField:c,selModel:{mode:c.multiSelect?"SIMPLE":"SINGLE"},floating:true,hidden:true,ownerCt:c.up("[floating]"),cls:c.el.up("."+d)?d:"",store:c.store,displayField:c.displayField,focusOnToFront:false,pageSize:c.pageSize,tpl:c.tpl},c.listConfig,c.defaultListConfig);a=c.picker=new Ext.view.BoundList(b);if(c.pageSize){a.pagingToolbar.on("beforechange",c.onPageChange,c)}c.mon(a,{itemclick:c.onItemClick,refresh:c.onListRefresh,scope:c});c.mon(a.getSelectionModel(),{beforeselect:c.onBeforeSelect,beforedeselect:c.onBeforeDeselect,selectionchange:c.onListSelectionChange,scope:c});return a},alignPicker:function(){var b=this,a=b.getPicker(),e=b.getPosition()[1]-Ext.getBody().getScroll().top,d=Ext.Element.getViewHeight()-e-b.getHeight(),c=Math.max(e,d);if(a.height){delete a.height;a.updateLayout()}if(a.getHeight()>c-5){a.setHeight(c-5)}b.callParent()},onListRefresh:function(){this.alignPicker();this.syncSelection()},onItemClick:function(c,a){var e=this,d=e.picker.getSelectionModel().getSelection(),b=e.valueField;if(!e.multiSelect&&d.length){if(a.get(b)===d[0].get(b)){e.displayTplData=[a.data];e.setRawValue(e.getDisplayValue());e.collapse()}}},onBeforeSelect:function(b,a){return this.fireEvent("beforeselect",this,a,a.index)},onBeforeDeselect:function(b,a){return this.fireEvent("beforedeselect",this,a,a.index)},onListSelectionChange:function(b,d){var a=this,e=a.multiSelect,c=d.length>0;if(!a.ignoreSelection&&a.isExpanded){if(!e){Ext.defer(a.collapse,1,a)}if(e||c){a.setValue(d,false)}if(c){a.fireEvent("select",a,d)}a.inputEl.focus()}},onExpand:function(){var d=this,a=d.listKeyNav,c=d.selectOnTab,b=d.getPicker();if(a){a.enable()}else{a=d.listKeyNav=new Ext.view.BoundListKeyNav(this.inputEl,{boundList:b,forceKeyDown:true,tab:function(g){if(c){this.selectHighlighted(g);d.triggerBlur()}return true}})}if(c){d.ignoreMonitorTab=true}Ext.defer(a.enable,1,a);d.inputEl.focus()},onCollapse:function(){var b=this,a=b.listKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},select:function(a){this.setValue(a,true)},findRecord:function(d,c){var b=this.store,a=b.findExact(d,c);return a!==-1?b.getAt(a):false},findRecordByValue:function(a){return this.findRecord(this.valueField,a)},findRecordByDisplay:function(a){return this.findRecord(this.displayField,a)},setValue:function(l,e){var k=this,c=k.valueNotFoundText,m=k.inputEl,g,j,h,b=[],a=[],d=[];if(k.store.loading){k.value=l;k.setHiddenValue(k.value);return k}l=Ext.Array.from(l);for(g=0,j=l.length;g<j;g++){h=l[g];if(!h||!h.isModel){h=k.findRecordByValue(h)}if(h){b.push(h);a.push(h.data);d.push(h.get(k.valueField))}else{if(!k.forceSelection){a.push(l[g]);d.push(l[g])}else{if(Ext.isDefined(c)){a.push(c)}}}}k.setHiddenValue(d);k.value=k.multiSelect?d:d[0];if(!Ext.isDefined(k.value)){k.value=null}k.displayTplData=a;k.lastSelection=k.valueModels=b;if(m&&k.emptyText&&!Ext.isEmpty(l)){m.removeCls(k.emptyCls)}k.setRawValue(k.getDisplayValue());k.checkChange();if(e!==false){k.syncSelection()}k.applyEmptyText();return k},setHiddenValue:function(j){var e=this,a=e.hiddenName,d;if(!e.hiddenDataEl||!a){return}j=Ext.Array.from(j);var b=e.hiddenDataEl.dom,k=b.childNodes,h=k[0],g=j.length,c=k.length;if(!h&&g>0){e.hiddenDataEl.update(Ext.DomHelper.markup({tag:"input",type:"hidden",name:a}));c=1;h=b.firstChild}while(c>g){b.removeChild(k[0]);--c}while(c<g){b.appendChild(h.cloneNode(true));++c}for(d=0;d<g;d++){k[d].value=j[d]}},getDisplayValue:function(){return this.displayTpl.apply(this.displayTplData)},getValue:function(){var b=this,a=b.picker,d=b.getRawValue(),c=b.value;if(b.getDisplayValue()!==d){c=d;b.value=b.displayTplData=b.valueModels=null;if(a){b.ignoreSelection++;a.getSelectionModel().deselectAll();b.ignoreSelection--}}return c},getSubmitValue:function(){return this.getValue()},isEqual:function(e,d){var b=Ext.Array.from,c,a;e=b(e);d=b(d);a=e.length;if(a!==d.length){return false}for(c=0;c<a;c++){if(d[c]!==e[c]){return false}}return true},clearValue:function(){this.setValue([])},syncSelection:function(){var d=this,e=Ext.Array,b=d.picker,c,a;if(b){c=[];e.forEach(d.valueModels||[],function(g){if(g&&g.isModel&&d.store.indexOf(g)>=0){c.push(g)}});d.ignoreSelection++;a=b.getSelectionModel();a.deselectAll();if(c.length){a.select(c)}d.ignoreSelection--}}});Ext.define("Ext.form.field.Time",{extend:"Ext.form.field.Picker",alias:"widget.timefield",requires:["Ext.form.field.Date","Ext.picker.Time","Ext.view.BoundListKeyNav","Ext.Date"],alternateClassName:["Ext.form.TimeField","Ext.form.Time"],triggerCls:Ext.baseCSSPrefix+"form-time-trigger",minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",submitFormat:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A",increment:15,pickerMaxHeight:300,selectOnTab:true,initDate:"1/1/2008",initDateFormat:"j/n/Y",ignoreSelection:0,initComponent:function(){var c=this,b=c.minValue,a=c.maxValue;if(b){c.setMinValue(b)}if(a){c.setMaxValue(a)}this.callParent()},initValue:function(){var a=this,b=a.value;if(Ext.isString(b)){a.value=a.rawToValue(b)}a.callParent()},setMinValue:function(c){var b=this,a=b.picker;b.setLimit(c,true);if(a){a.setMinValue(b.minValue)}},setMaxValue:function(c){var b=this,a=b.picker;b.setLimit(c,false);if(a){a.setMaxValue(b.maxValue)}},setLimit:function(b,g){var a=this,e,c;if(Ext.isString(b)){e=a.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){c=Ext.Date.clearTime(new Date(a.initDate));c.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());a[g?"minValue":"maxValue"]=c}},rawToValue:function(a){return this.parseDate(a)||a||null},valueToRaw:function(a){return this.formatDate(this.parseDate(a))},getErrors:function(d){var b=this,g=Ext.String.format,h=b.callParent(arguments),c=b.minValue,e=b.maxValue,a;d=b.formatDate(d||b.processRawValue(b.getRawValue()));if(d===null||d.length<1){return h}a=b.parseDate(d);if(!a){h.push(g(b.invalidText,d,b.format));return h}if(c&&a<c){h.push(g(b.minText,b.formatDate(c)))}if(e&&a>e){h.push(g(b.maxText,b.formatDate(e)))}return h},formatDate:function(){return Ext.form.field.Date.prototype.formatDate.apply(this,arguments)},parseDate:function(e){if(!e||Ext.isDate(e)){return e}var d=this,h=d.safeParse(e,d.format),b=d.altFormats,g=d.altFormatsArray,c=0,a;if(!h&&b){g=g||b.split("|");a=g.length;for(;c<a&&!h;++c){h=d.safeParse(e,g[c])}}return h},safeParse:function(e,g){var d=this,b=Ext.Date,c,a=null;if(b.formatContainsDateInfo(g)){a=b.parse(e,g)}else{c=b.parse(d.initDate+" "+e,d.initDateFormat+" "+g);if(c){a=c}}return a},getSubmitValue:function(){var a=this,c=a.submitFormat||a.format,b=a.getValue();return b?Ext.Date.format(b,c):null},createPicker:function(){var b=this,a=new Ext.picker.Time({pickerField:b,selModel:{mode:"SINGLE"},floating:true,hidden:true,minValue:b.minValue,maxValue:b.maxValue,increment:b.increment,format:b.format,ownerCt:this.ownerCt,renderTo:document.body,maxHeight:b.pickerMaxHeight,focusOnToFront:false});b.mon(a.getSelectionModel(),{selectionchange:b.onListSelect,scope:b});b.mon(a,{scope:b,itemclick:b.onItemClick});return a},onItemClick:function(c,a){var e=this,b=e.valueField,d=c.getSelectionModel().getSelection();if(d.length>0){d=d[0];if(d&&Ext.Date.isEqual(a.get("date"),d.get("date"))){e.collapse()}}},onExpand:function(){var e=this,a=e.pickerKeyNav,d=e.selectOnTab,b=e.getPicker(),g,c;if(!a){a=e.pickerKeyNav=new Ext.view.BoundListKeyNav(this.inputEl,{boundList:b,forceKeyDown:true,tab:function(h){if(d){if(e.picker.highlightedItem){this.selectHighlighted(h)}else{e.collapse()}e.triggerBlur()}return true}});if(d){e.ignoreMonitorTab=true}}Ext.defer(a.enable,1,a);e.syncSelection();c=b.getSelectionModel().getSelection()[0];if(c){g=b.getNode(c);b.highlightItem(g);b.listEl.scrollChildIntoView(g,false)}},onCollapse:function(){var b=this,a=b.pickerKeyNav;if(a){a.disable();b.ignoreMonitorTab=false}},onChange:function(){var b=this,a=b.picker;b.callParent(arguments);if(a){a.clearHighlight()}},onListSelect:function(c,e){var b=this,a=e[0],d=a?a.get("date"):null;if(!b.ignoreSelection){b.skipSync=true;b.setValue(d);b.skipSync=false;b.fireEvent("select",b,d);b.picker.clearHighlight();b.collapse();b.inputEl.focus()}},setValue:function(){this.callParent(arguments);this.syncSelection()},syncSelection:function(){var d=this,b=d.picker,c,a,e;if(b&&!d.skipSync){b.clearHighlight();e=d.getValue();a=b.getSelectionModel();d.ignoreSelection++;if(e===null){a.deselectAll()}else{if(Ext.isDate(e)){b.store.each(function(g){if(Ext.Date.isEqual(g.get("date"),e)){c=g;return false}});a.select(c)}}d.ignoreSelection--}},postBlur:function(){var a=this;a.callParent(arguments);a.setRawValue(a.formatDate(a.getValue()))}});Ext.define("Ext.view.Table",{extend:"Ext.view.View",alias:"widget.tableview",uses:["Ext.view.TableChunker","Ext.util.DelayedTask","Ext.util.MixedCollection"],baseCls:Ext.baseCSSPrefix+"grid-view",itemSelector:"tr."+Ext.baseCSSPrefix+"grid-row",cellSelector:"td."+Ext.baseCSSPrefix+"grid-cell",rowSelector:"tr."+Ext.baseCSSPrefix+"grid-row",headerRowSelector:"tr."+Ext.baseCSSPrefix+"grid-header-row",selectedItemCls:Ext.baseCSSPrefix+"grid-row-selected",selectedCellCls:Ext.baseCSSPrefix+"grid-cell-selected",focusedItemCls:Ext.baseCSSPrefix+"grid-row-focused",overItemCls:Ext.baseCSSPrefix+"grid-row-over",altRowCls:Ext.baseCSSPrefix+"grid-row-alt",rowClsRe:/(?:^|\s*)grid-row-(first|last|alt)(?:\s+|$)/g,cellRe:new RegExp(Ext.baseCSSPrefix+"grid-cell-([^\\s]+) ",""),trackOver:true,getRowClass:null,stripeRows:true,markDirty:true,initComponent:function(){var b=this,a=b.scroll;b.autoScroll=undefined;if(a===true||a==="both"){b.style=Ext.apply(b.style||{},{overflow:"auto"})}else{if(a==="horizontal"){b.style=Ext.apply(b.style||{},{"overflow-x":"auto","overflow-y":"hidden"})}else{if(a==="vertical"){b.style=Ext.apply(b.style||{},{"overflow-x":"hidden","overflow-y":"auto"})}else{b.style=Ext.apply(b.style||{},{overflow:"hidden"})}}}b.selModel.view=b;b.headerCt.view=b;b.headerCt.markDirty=b.markDirty;b.initFeatures();b.tpl="<div></div>";b.callParent()},moveColumn:function(a,m,c){var l=this,e,d,n,g,k,h=(c>1)?document.createDocumentFragment():undefined,b=m;if(l.rendered){k=l.el.down(l.headerRowSelector,true);n=l.el.query(l.rowSelector);g=n.length;if(m>a&&h){b-=c}if(h){for(d=0;d<c;d++){h.appendChild(k.cells[a])}k.insertBefore(h,k.cells[b]||null)}else{k.insertBefore(k.cells[a],k.cells[b]||null)}for(e=0;e<g;e++){k=n[e];if(h){for(d=0;d<c;d++){h.appendChild(k.cells[a])}k.insertBefore(h,k.cells[b]||null)}else{k.insertBefore(k.cells[a],k.cells[b]||null)}}l.setNewTemplate()}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:"el"})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(){var d=this,b=0,c,a;d.features=d.features||[];c=d.features;a=c.length;d.featuresMC=new Ext.util.MixedCollection();for(;b<a;b++){if(!c[b].isFeature){c[b]=Ext.create("feature."+c[b].ftype,c[b])}c[b].view=d;d.featuresMC.add(c[b]);c[b].init()}},attachEventsForFeatures:function(){var b=this.features,c=b.length,a=0;for(;a<c;a++){if(b[a].isFeature){b[a].attachEvents()}}},afterRender:function(){var a=this;a.callParent();if(!a.enableTextSelection){a.el.unselectable()}a.attachEventsForFeatures()},onViewScroll:function(b,a){this.callParent(arguments);this.fireEvent("bodyscroll",b,a)},prepareData:function(b,h,d){var g=this,k=g.headerCt.prepareData(b,h,d,g,g.ownerCt),a=g.features,e=a.length,c=0,j;for(;c<e;c++){j=a[c];if(j.isFeature){Ext.apply(k,j.getAdditionalData(b,h,d,k,g))}}return k},collectData:function(d,n){var p=this.callParent(arguments),c=this.headerCt,m=c.getFullWidth(),b=this.features,k=b.length,a={rows:p,fullWidth:m},g=0,q,e=0,l,h;l=p.length;if(this.getRowClass){for(;e<l;e++){h={};p[e].rowCls=this.getRowClass(d[e],e,h,this.store)}}for(;g<k;g++){q=b[g];if(q.isFeature&&q.collectData&&!q.disabled){a=q.collectData(d,p,n,m,a);break}}return a},onHeaderResize:function(e,a,d){var c=this,b=c.el;if(b){b.select("th."+Ext.baseCSSPrefix+"grid-col-resizer-"+e.id).setWidth(a);b.select("table."+Ext.baseCSSPrefix+"grid-table-resizer").setWidth(c.headerCt.getFullWidth());if(!c.ignoreTemplate){c.setNewTemplate()}if(!d){c.el.focus()}}},onHeaderShow:function(c,d,b){var a=this;a.ignoreTemplate=true;if(d.oldWidth){a.onHeaderResize(d,d.oldWidth,b);delete d.oldWidth}else{if(d.width&&!d.flex){a.onHeaderResize(d,d.width,b)}}delete a.ignoreTemplate;a.setNewTemplate()},onHeaderHide:function(b,c,a){this.onHeaderResize(c,0,a)},refreshHeight:function(){var a=this.up("grid");Ext.suspendLayouts();this.callParent(arguments);if(a&&(a=a.child("headercontainer"))&&Ext.getScrollbarSize().width&&a.child("[flex]")){a.updateLayout()}Ext.resumeLayouts(true)},setNewTemplate:function(){var b=this,a=b.headerCt.getColumnsForTpl(true);b.tpl=b.getTableChunker().getTableTpl({rowCount:b.store.getCount(),columns:a,features:b.features,enableTextSelection:b.enableTextSelection})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(b){var a=this;a.removeRowCls(b,a.selectedItemCls);a.removeRowCls(b,a.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b);if(a){a.addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b);if(a){a.removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(b){var h=b.row,e=b.column,d=this.store,g=this.getNode(h),i=this.headerCt.getHeaderAtIndex(e),c,a=false;if(i&&g){c=i.getCellSelector();a=Ext.fly(g).down(c)}return a},onRowFocus:function(d,b,a){var c=this,e=c.getNode(d);if(b){c.addRowCls(d,c.focusedItemCls);if(!a){c.focusRow(d)}}else{c.removeRowCls(d,c.focusedItemCls)}},focusRow:function(b){var g=this,k=g.getNode(b),c=g.el,i=0,a=g.ownerCt,j,h,e,d;if(k&&c){h=c.getY();e=h+c.dom.clientHeight;j=Ext.fly(k).getRegion();if(j.top<h){i=j.top-h}else{if(j.bottom>e){i=j.bottom-e}}d=g.getRecord(k);b=g.store.indexOf(d);if(i){a.scrollByDeltaY(i)}g.fireEvent("rowfocus",d,k,b)}},focusCell:function(h){var j=this,k=j.getCellByPosition(h),b=j.el,d=0,e=0,c=b.getRegion(),a=j.ownerCt,i,g;c.bottom=c.top+b.dom.clientHeight;c.right=c.left+b.dom.clientWidth;if(k){i=k.getRegion();if(i.top<c.top){d=i.top-c.top}else{if(i.bottom>c.bottom){d=i.bottom-c.bottom}}if(i.left<c.left){e=i.left-c.left}else{if(i.right>c.right){e=i.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();j.fireEvent("cellfocus",g,k,h)}},scrollByDelta:function(c,b){b=b||"scrollTop";var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(p,g,d,o){var n=this,j=n.store.indexOf(g),r,l,a,b,h,e,c=n.headerCt.getGridColumns(),k=n.overItemCls,m,q,s;if(j>-1){r=n.bufferRender([g],j)[0];l=n.all.item(j);m=l.hasCls(k);l.dom.className=r.className;if(m){l.addCls(k)}a=l.query(this.cellSelector);b=Ext.fly(r).query(this.cellSelector);h=b.length;s=a[0].parentNode;for(e=0;e<h;e++){q=c[e].dataIndex;if(n.shouldUpdateCell(o,q)){s.insertBefore(b[e],a[e]);s.removeChild(a[e])}}n.selModel.refresh();n.doStripeRows(j,j);n.fireEvent("itemupdate",g,j,r)}},shouldUpdateCell:function(a,b){return !a||Ext.Array.contains(a,b)},refresh:function(){this.setNewTemplate();this.callParent(arguments);this.doStripeRows(0)},processItemEvent:function(b,m,j,d){var h=this,k=d.getTarget(h.cellSelector,m),i=k?k.cellIndex:-1,a=h.statics().EventMap,c=h.getSelectionModel(),g=d.type,l;if(g=="keydown"&&!k&&c.getCurrentPosition){k=h.getCellByPosition(c.getCurrentPosition());if(k){k=k.dom;i=k.cellIndex}}l=h.fireEvent("uievent",g,h,k,j,i,d);if(l===false||h.callParent(arguments)===false){return false}if(g=="mouseover"||g=="mouseout"){return true}if(!k){return true}return !((h["onBeforeCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("beforecell"+g,h,k,i,b,m,j,d)===false)||(h["onCell"+a[g]](k,i,b,m,j,d)===false)||(h.fireEvent("cell"+g,h,k,i,b,m,j,d)===false))},processSpecialEvent:function(k){var n=this,b=n.statics().EventMap,d=n.features,m=d.length,o=k.type,g,p,h,j,c,l,a=n.ownerCt;n.callParent(arguments);if(o=="mouseover"||o=="mouseout"){return}for(g=0;g<m;g++){p=d[g];if(p.hasFeatureEvent){j=k.getTarget(p.eventSelector,n.getTargetEl());if(j){h=p.eventPrefix;c=p.getFireEventArgs("before"+h+o,n,j,k);l=p.getFireEventArgs(h+o,n,j,k);if((n.fireEvent.apply(n,c)===false)||(a.fireEvent.apply(a,c)===false)||(n.fireEvent.apply(n,l)===false)||(a.fireEvent.apply(a,l)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(b){if(b){var a=this.getMaxContentWidth(b);delete b.flex;b.setWidth(a)}},getMaxContentWidth:function(h){var a=h.getCellInnerSelector(),c=this.el.query(a),d=0,g=c.length,e=h.el.dom.scrollWidth,b;for(;d<g;d++){b=c[d].scrollWidth;if(b>e){e=b}}return e},getPositionByEvent:function(g){var d=this,b=g.getTarget(d.cellSelector),c=g.getTarget(d.itemSelector),a=d.getRecord(c),h=d.getHeaderByCell(b);return d.getPosition(a,h)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&&a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(l,m,h,n,a,o){var j=this,p=l.row,d=l.column,k=j.store.getCount(),g=j.getFirstVisibleColumnIndex(),b=j.getLastVisibleColumnIndex(),i={row:p,column:d},c=j.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}h=h||{};m=m.toLowerCase();switch(m){case"right":if(d===b){if(n||p===k-1){return false}if(!h.ctrlKey){i.row=p+1;i.column=g}}else{if(!h.ctrlKey){i.column=d+j.getRightGap(c)}else{i.column=b}}break;case"left":if(d===g){if(n||p===0){return false}if(!h.ctrlKey){i.row=p-1;i.column=b}}else{if(!h.ctrlKey){i.column=d+j.getLeftGap(c)}else{i.column=g}}break;case"up":if(p===0){return false}else{if(!h.ctrlKey){i.row=p-1}else{i.row=0}}break;case"down":if(p===k-1){return false}else{if(!h.ctrlKey){i.row=p+1}else{i.row=k-1}}break}if(a&&a.call(o||window,i)!==true){return false}else{return i}},getFirstVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[0];return c.getHeaderIndex(b)},getLastVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(":not([hidden])",a),b=d[d.length-1];return c.getHeaderIndex(b)},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c<=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(a){var g=this.getHeaderCt(),e=g.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d>=0;d--){if(!e[d].hidden){b=d;break}}return b-c},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},doStripeRows:function(b,a){if(this.stripeRows){var d=this.getNodes(b,a),g=d.length,c=0,e;for(;c<g;c++){e=d[c];e.className=e.className.replace(this.rowClsRe," ");b++;if(b%2===0){e.className+=(" "+this.altRowCls)}}}}});Ext.define("Ext.grid.View",{extend:"Ext.view.Table",alias:"widget.gridview",stripeRows:true,autoScroll:true});Ext.define("Ext.grid.Panel",{extend:"Ext.panel.Table",requires:["Ext.grid.View"],alias:["widget.gridpanel","widget.grid"],alternateClassName:["Ext.list.ListView","Ext.ListView","Ext.grid.GridPanel"],viewType:"gridview",lockable:false,bothCfgCopy:["invalidateScrollerOnRefresh","hideHeaders","enableColumnHide","enableColumnMove","enableColumnResize","sortableColumns"],normalCfgCopy:["verticalScroller","verticalScrollDock","verticalScrollerType","scroll"],lockedCfgCopy:[],rowLines:true});Ext.define("Ext.grid.property.Grid",{extend:"Ext.grid.Panel",alias:"widget.propertygrid",alternateClassName:"Ext.grid.PropertyGrid",uses:["Ext.grid.plugin.CellEditing","Ext.grid.property.Store","Ext.grid.property.HeaderContainer","Ext.XTemplate","Ext.grid.CellEditor","Ext.form.field.Date","Ext.form.field.Text","Ext.form.field.Number","Ext.form.field.ComboBox"],valueField:"value",nameField:"name",enableColumnMove:false,columnLines:true,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,initComponent:function(){var a=this;a.addCls(Ext.baseCSSPrefix+"property-grid");a.plugins=a.plugins||[];a.plugins.push(new Ext.grid.plugin.CellEditing({clicksToEdit:a.clicksToEdit,startEdit:function(b,c){return this.self.prototype.startEdit.call(this,b,a.headerCt.child("#"+a.valueField))}}));a.selModel={selType:"cellmodel",onCellSelect:function(b){if(b.column!=1){b.column=1}return this.self.prototype.onCellSelect.call(this,b)}};a.customRenderers=a.customRenderers||{};a.customEditors=a.customEditors||{};if(!a.store){a.propStore=a.store=new Ext.grid.property.Store(a,a.source)}if(a.sortableColumns){a.store.sort("name","ASC")}a.columns=new Ext.grid.property.HeaderContainer(a,a.store);a.addEvents("beforepropertychange","propertychange");a.callParent();a.getView().walkCells=this.walkCells;a.editors={date:new Ext.grid.CellEditor({field:new Ext.form.field.Date({selectOnFocus:true})}),string:new Ext.grid.CellEditor({field:new Ext.form.field.Text({selectOnFocus:true})}),number:new Ext.grid.CellEditor({field:new Ext.form.field.Number({selectOnFocus:true})}),"boolean":new Ext.grid.CellEditor({field:new Ext.form.field.ComboBox({editable:false,store:[[true,a.headerCt.trueText],[false,a.headerCt.falseText]]})})};a.store.on("update",a.onUpdate,a)},onUpdate:function(d,a,c){var g=this,b,e;if(c==Ext.data.Model.EDIT){b=a.get(g.valueField);e=a.modified.value;if(g.fireEvent("beforepropertychange",g.source,a.getId(),b,e)!==false){if(g.source){g.source[a.getId()]=b}a.commit();g.fireEvent("propertychange",g.source,a.getId(),b,e)}else{a.reject()}}},walkCells:function(h,g,d,c,a,b){if(g=="left"){g="up"}else{if(g=="right"){g="down"}}h=Ext.view.Table.prototype.walkCells.call(this,h,g,d,c,a,b);if(!h.column){h.column=1}return h},getCellEditor:function(a,c){var d=this,e=a.get(d.nameField),g=a.get(d.valueField),b=d.customEditors[e];if(b){if(!(b instanceof Ext.grid.CellEditor)){if(!(b instanceof Ext.form.field.Base)){b=Ext.ComponentManager.create(b,"textfield")}b=d.customEditors[e]=new Ext.grid.CellEditor({field:b})}}else{if(Ext.isDate(g)){b=d.editors.date}else{if(Ext.isNumber(g)){b=d.editors.number}else{if(Ext.isBoolean(g)){b=d.editors["boolean"]}else{b=d.editors.string}}}}b.editorId=e;return b},beforeDestroy:function(){var a=this;a.callParent();a.destroyEditors(a.editors);a.destroyEditors(a.customEditors);delete a.source},destroyEditors:function(b){for(var a in b){if(b.hasOwnProperty(a)){Ext.destroy(b[a])}}},setSource:function(a){this.source=a;this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.define("Ext.tree.View",{extend:"Ext.view.Table",alias:"widget.treeview",loadingCls:Ext.baseCSSPrefix+"grid-tree-loading",expandedCls:Ext.baseCSSPrefix+"grid-tree-node-expanded",expanderSelector:"."+Ext.baseCSSPrefix+"tree-expander",checkboxSelector:"."+Ext.baseCSSPrefix+"tree-checkbox",expanderIconOverCls:Ext.baseCSSPrefix+"tree-expander-over",nodeAnimWrapCls:Ext.baseCSSPrefix+"tree-animator-wrap",blockRefresh:true,rootVisible:true,deferInitialRefresh:false,expandDuration:250,collapseDuration:250,toggleOnDblClick:true,stripeRows:false,uiFields:["expanded","loaded","checked","expandable","leaf","icon","iconCls","loading"],initComponent:function(){var a=this,b=a.panel.getStore();if(a.initialConfig.animate===undefined){a.animate=Ext.enableFx}a.store=new Ext.data.NodeStore({autoLoad:b.autoLoad,treeStore:b,recursive:true,rootVisible:a.rootVisible,listeners:{beforeexpand:a.onBeforeExpand,expand:a.onExpand,beforecollapse:a.onBeforeCollapse,collapse:a.onCollapse,write:a.onStoreWrite,datachanged:a.onStoreDataChanged,scope:a}});if(a.node){a.setRootNode(a.node)}a.animQueue={};a.animWraps={};a.addEvents("afteritemexpand","afteritemcollapse");a.callParent(arguments);a.on({element:"el",scope:a,delegate:a.expanderSelector,mouseover:a.onExpanderMouseOver,mouseout:a.onExpanderMouseOut});a.on({element:"el",scope:a,delegate:a.checkboxSelector,click:a.onCheckboxChange})},afterComponentLayout:function(){this.callParent(arguments);var a=this.stretcher;if(a){a.setWidth((this.getWidth()-Ext.getScrollbarSize().width))}},processUIEvent:function(a){if(a.getTarget("."+this.nodeAnimWrapCls,this.el)){return false}return this.callParent(arguments)},onClear:function(){this.store.removeAll()},setRootNode:function(b){var a=this;a.store.setNode(b);a.node=b},onCheckboxChange:function(d,a){var c=this,b=d.getTarget(c.getItemSelector(),c.getTargetEl());if(b){c.onCheckChange(c.getRecord(b))}},onCheckChange:function(a){var b=a.get("checked");if(Ext.isBoolean(b)){b=!b;a.set("checked",b);this.fireEvent("checkchange",a,b)}},getChecked:function(){var a=[];this.node.cascadeBy(function(b){if(b.get("checked")){a.push(b)}});return a},isItemChecked:function(a){return a.get("checked")},createAnimWrap:function(j,k){var g="",e=this.panel.headerCt,b=e.getGridColumns(),h=0,l=b.length,m,d=this.getNode(j),a,c;for(;h<l;h++){m=b[h];g+='<th style="width: '+(m.hidden?0:m.getDesiredWidth())+'px; height: 0px;"></th>'}c=Ext.get(d);a=c.insertSibling({tag:"tr",html:['<td colspan="'+e.getColumnCount()+'">','<div class="'+this.nodeAnimWrapCls+'">','<table class="'+Ext.baseCSSPrefix+'grid-table" style="width: '+e.getFullWidth()+'px;"><tbody>',g,"</tbody></table>","</div>","</td>"].join("")},"after");return{record:j,node:d,el:a,expanding:false,collapsing:false,animating:false,animateEl:a.down("div"),targetEl:a.down("tbody")}},getAnimWrap:function(d,a){if(!this.animate){return null}var d=d,b=this.animWraps,c=b[d.internalId];if(a!==false){while(!c&&d){d=d.parentNode;if(d){c=b[d.internalId]}}}return c},doAdd:function(b,d,i){var j=this,g=d[0],l=g.parentNode,k=j.all.elements,n=0,e=j.getAnimWrap(l),m,c,h;if(!e||!e.expanding){return j.callParent(arguments)}l=e.record;m=e.targetEl;c=m.dom.childNodes;h=c.length-1;n=i-j.indexOf(l)-1;if(!h||n>=h){m.appendChild(b)}else{Ext.fly(c[n+1]).insertSibling(b,"before",true)}Ext.Array.insert(k,i,b);if(e.isAnimating){j.onExpand(l)}},beginBulkUpdate:function(){this.bulkUpdate=true;this.ownerCt.changingScrollbars=true},endBulkUpdate:function(){this.bulkUpdate=false;this.ownerCt.changingScrollbars=true},onRemove:function(e,a,b){var d=this,c=d.bulkUpdate;d.doRemove(a,b);if(!c){d.updateIndexes(b)}if(d.store.getCount()===0){d.refresh()}if(!c){d.fireEvent("itemremove",a,b)}},doRemove:function(a,c){var g=this,d=g.all,b=g.getAnimWrap(a),e=d.item(c).dom;if(!b||!b.collapsing){return g.callParent(arguments)}b.targetEl.appendChild(e);d.removeElement(c)},onBeforeExpand:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d,false);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d);a.animateEl.setHeight(0)}else{if(a.collapsing){a.targetEl.select(e.itemSelector).remove()}}a.expanding=true;a.collapsing=false}},onExpand:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d,b,j;if(h.singleExpand){h.ensureSingleExpand(i)}if(g===-1){return}d=h.getAnimWrap(i,false);if(!d){h.fireEvent("afteritemexpand",i,g,c);return}b=d.animateEl;j=d.targetEl;b.stopAnimation();e[a]=true;b.slideIn("t",{duration:h.expandDuration,listeners:{scope:h,lastframe:function(){d.el.insertSibling(j.query(h.itemSelector),"before");d.el.remove();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.fireEvent("afteritemexpand",i,g,c)}});d.isAnimating=true},onBeforeCollapse:function(d,b,c){var e=this,a;if(!e.rendered||!e.animate){return}if(e.getNode(d)){a=e.getAnimWrap(d);if(!a){a=e.animWraps[d.internalId]=e.createAnimWrap(d,c)}else{if(a.expanding){a.targetEl.select(this.itemSelector).remove()}}a.expanding=false;a.collapsing=true}},onCollapse:function(i){var h=this,e=h.animQueue,a=i.getId(),c=h.getNode(i),g=c?h.indexOf(c):-1,d=h.getAnimWrap(i),b,j;if(g===-1){return}if(!d){h.fireEvent("afteritemcollapse",i,g,c);return}b=d.animateEl;j=d.targetEl;e[a]=true;b.stopAnimation();b.slideOut("t",{duration:h.collapseDuration,listeners:{scope:h,lastframe:function(){d.el.remove();delete h.animWraps[d.record.internalId];delete e[a]}},callback:function(){h.fireEvent("afteritemcollapse",i,g,c)}});d.isAnimating=true},isAnimating:function(a){return !!this.animQueue[a.getId()]},collectData:function(c){var g=this.callParent(arguments),e=g.rows,a=e.length,d=0,h,b;for(;d<a;d++){h=e[d];b=c[d];if(b.get("qtip")){h.rowAttr='data-qtip="'+b.get("qtip")+'"';if(b.get("qtitle")){h.rowAttr+=' data-qtitle="'+b.get("qtitle")+'"'}}if(b.isExpanded()){h.rowCls=(h.rowCls||"")+" "+this.expandedCls}if(b.isLoading()){h.rowCls=(h.rowCls||"")+" "+this.loadingCls}}return g},expand:function(b,a,d,c){return b.expand(a,d,c)},collapse:function(b,a,d,c){return b.collapse(a,d,c)},toggle:function(a){this[a.isExpanded()?"collapse":"expand"](a)},onItemDblClick:function(a,d,c){var b=this.editingPlugin;this.callParent(arguments);if(this.toggleOnDblClick&&!(b&&b.clicksToEdit===2)){this.toggle(a)}},onBeforeItemMouseDown:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){return false}return this.callParent(arguments)},onItemClick:function(a,c,b,d){if(d.getTarget(this.expanderSelector,c)){this.toggle(a);return false}return this.callParent(arguments)},onExpanderMouseOver:function(b,a){b.getTarget(this.cellSelector,10,true).addCls(this.expanderIconOverCls)},onExpanderMouseOut:function(b,a){b.getTarget(this.cellSelector,10,true).removeCls(this.expanderIconOverCls)},getTreeStore:function(){return this.panel.store},ensureSingleExpand:function(b){var a=b.parentNode;if(a){a.eachChild(function(c){if(c!==b&&c.isExpanded()){c.collapse()}})}},shouldUpdateCell:function(a,b){return Ext.Array.contains(this.uiFields,b)||this.callParent()},onStoreWrite:function(b,a){var c=this.panel.store;c.fireEvent("write",c,a)},onStoreDataChanged:function(b,a){var c=this.panel.store;c.fireEvent("datachanged",c)}});Ext.define("Ext.tree.Panel",{extend:"Ext.panel.Table",alias:"widget.treepanel",alternateClassName:["Ext.tree.TreePanel","Ext.TreePanel"],requires:["Ext.tree.View","Ext.selection.TreeModel","Ext.tree.Column"],viewType:"treeview",selType:"treemodel",treeCls:Ext.baseCSSPrefix+"tree-panel",deferRowRender:false,rowLines:false,lines:true,useArrows:false,singleExpand:false,ddConfig:{enableDrag:true,enableDrop:true},rootVisible:true,displayField:"text",root:null,normalCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible","scroll"],lockedCfgCopy:["displayField","root","singleExpand","useArrows","lines","rootVisible"],constructor:function(a){a=a||{};if(a.animate===undefined){a.animate=Ext.enableFx}this.enableAnimations=a.animate;delete a.animate;this.callParent([a])},initComponent:function(){var c=this,b=[c.treeCls],a;if(c.useArrows){b.push(Ext.baseCSSPrefix+"tree-arrows");c.lines=false}if(c.lines){b.push(Ext.baseCSSPrefix+"tree-lines")}else{if(!c.useArrows){b.push(Ext.baseCSSPrefix+"tree-no-lines")}}if(Ext.isString(c.store)){c.store=Ext.StoreMgr.lookup(c.store)}else{if(!c.store||Ext.isObject(c.store)&&!c.store.isStore){c.store=new Ext.data.TreeStore(Ext.apply({},c.store||{},{root:c.root,fields:c.fields,model:c.model,folderSort:c.folderSort}))}else{if(c.root){c.store=Ext.data.StoreManager.lookup(c.store);c.store.setRootNode(c.root);if(c.folderSort!==undefined){c.store.folderSort=c.folderSort;c.store.sort()}}}}c.viewConfig=Ext.apply({},c.viewConfig);c.viewConfig=Ext.applyIf(c.viewConfig,{rootVisible:c.rootVisible,animate:c.enableAnimations,singleExpand:c.singleExpand,node:c.store.getRootNode(),hideHeaders:c.hideHeaders});c.mon(c.store,{scope:c,rootchange:c.onRootChange,clear:c.onClear});c.relayEvents(c.store,["beforeload","load"]);c.store.on({append:c.createRelayer("itemappend"),remove:c.createRelayer("itemremove"),move:c.createRelayer("itemmove"),insert:c.createRelayer("iteminsert"),beforeappend:c.createRelayer("beforeitemappend"),beforeremove:c.createRelayer("beforeitemremove"),beforemove:c.createRelayer("beforeitemmove"),beforeinsert:c.createRelayer("beforeiteminsert"),expand:c.createRelayer("itemexpand"),collapse:c.createRelayer("itemcollapse"),beforeexpand:c.createRelayer("beforeitemexpand"),beforecollapse:c.createRelayer("beforeitemcollapse")});if(!c.columns){if(c.initialConfig.hideHeaders===undefined){c.hideHeaders=true}c.autoWidth=true;c.addCls(Ext.baseCSSPrefix+"autowidth-table");c.columns=[{xtype:"treecolumn",text:"Name",width:Ext.isIE6?null:10000,dataIndex:c.displayField}]}if(c.cls){b.push(c.cls)}c.cls=b.join(" ");c.callParent();a=c.getView();c.relayEvents(a,["checkchange","afteritemexpand","afteritemcollapse"]);if(!a.rootVisible&&!c.getRootNode()){c.setRootNode({expanded:true})}},onClear:function(){this.view.onClear()},setRootNode:function(){return this.store.setRootNode.apply(this.store,arguments)},getRootNode:function(){return this.store.getRootNode()},onRootChange:function(a){this.view.setRootNode(a)},getChecked:function(){return this.getView().getChecked()},isItemChecked:function(a){return a.get("checked")},expandAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}b.expand(true,e,d);if(!c){a.endBulkUpdate()}}},collapseAll:function(e,d){var b=this.getRootNode(),c=this.enableAnimations,a=this.getView();if(b){if(!c){a.beginBulkUpdate()}if(a.rootVisible){b.collapse(true,e,d)}else{b.collapseChildren(true,e,d)}if(!c){a.endBulkUpdate()}}},expandPath:function(l,g,a,h,k){var d=this,c=d.getRootNode(),b=1,e=d.getView(),j,i;g=g||d.getRootNode().idProperty;a=a||"/";if(Ext.isEmpty(l)){Ext.callback(h,k||d,[false,null]);return}j=l.split(a);if(c.get(g)!=j[1]){Ext.callback(h,k||d,[false,c]);return}i=function(){if(++b===j.length){Ext.callback(h,k||d,[true,c]);return}var m=c.findChild(g,j[b]);if(!m){Ext.callback(h,k||d,[false,c]);return}c=m;c.expand(false,i)};c.expand(false,i)},selectPath:function(h,g,e,i,a){var d=this,c,b;g=g||d.getRootNode().idProperty;e=e||"/";c=h.split(e);b=c.pop();d.expandPath(c.join(e),g,e,function(l,k){var j=false;if(l&&k){k=k.findChild(g,b);if(k){d.getSelectionModel().select(k);Ext.callback(i,a||d,[true,k]);j=true}}else{if(k===d.getRootNode()){j=true}}Ext.callback(i,a||d,[j,k])},d)}});Ext.define("Ext.window.Window",{extend:"Ext.panel.Panel",alternateClassName:"Ext.Window",requires:["Ext.util.ComponentDragger","Ext.util.Region","Ext.EventManager"],alias:"widget.window",baseCls:Ext.baseCSSPrefix+"window",resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:50,minWidth:50,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:"visibility",floating:true,ariaRole:"alertdialog",itemCls:Ext.baseCSSPrefix+"window-item",overlapHeader:true,ignoreHeaderBorderManagement:true,isWindow:true,initComponent:function(){var a=this;a.callParent();a.addEvents("resize","maximize","minimize","restore");if(a.plain){a.addClsWithUI("plain")}if(a.modal){a.ariaRole="dialog"}if(a.floating){a.on({element:"el",mousedown:a.onMouseDown,scope:a})}},getElConfig:function(){var a=this.callParent();a.tabIndex=-1;return a},initStateEvents:function(){var a=this.stateEvents;Ext.each(["maximize","restore","resize","dragend"],function(b){if(Ext.Array.indexOf(a,b)===-1){a.push(b)}});this.callParent()},getState:function(){var b=this,c=b.callParent()||{},a=!!b.maximized;c.maximized=a;Ext.apply(c,{size:a?b.restoreSize:b.getSize(),pos:a?b.restorePos:b.getPosition()});return c},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onMouseDown:function(b){var a;if(this.floating){if(Ext.fly(b.getTarget()).focusable()){a=true}this.toFront(a)}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({dblclick:{fn:c.toggleMaximize,element:"el",scope:c}})}},afterRender:function(){var a=this,b;a.callParent();if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){b=a.getKeyMap();b.on(27,a.onEsc,a);b.disable()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}if(b.header){a=Ext.applyIf({el:b.el,delegate:"#"+b.header.id},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=new Ext.util.ComponentDragger(this,a);b.relayEvents(b.dd,["dragstart","drag","dragend"])}},onEsc:function(a,b){if(!Ext.FocusManager||!Ext.FocusManager.enabled||Ext.FocusManager.focusedCmp===this){b.stopEvent();this.close()}},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:"minimize",handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:"maximize",handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:"restore",handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getDefaultFocus:function(){var a=this,c=a.focusEl,b=a.defaultButton||a.defaultFocus;if(Ext.isDefined(b)){if(Ext.isNumber(b)){c=a.query("button")[b]}else{if(Ext.isString(b)){c=a.down("#"+b)}else{c=b}}}return c||a},onFocus:function(){var b=this,a;if((Ext.FocusManager&&Ext.FocusManager.enabled)||((a=b.getDefaultFocus())===b)){b.callParent(arguments)}else{a.focus()}},beforeShow:function(){this.callParent();if(this.expandOnShow){this.expand(false)}},afterShow:function(c){var b=this,a=c||b.animateTarget;b.callParent(arguments);if(b.maximized){b.fitContainer()}b.syncMonitorWindowResize();if(!a){b.doConstrain()}if(b.keyMap){b.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent("close",a);if(a.closeAction=="destroy"){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent("minimize",this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.resizer){a.resizer.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+"window-maximized");a.container.addCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.setPosition(0,0);a.fitContainer();a.fireEvent("maximize",a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+"window-maximized");if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.maximized=false;a.el.enableShadow(true);if(a.dd){a.dd.enable()}if(a.resizer){a.resizer.enable()}a.container.removeCls(Ext.baseCSSPrefix+"window-maximized-ct");a.syncMonitorWindowResize();a.doConstrain();a.fireEvent("restore",a)}return a},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&&!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b);b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()}});Ext.define("Ext.window.MessageBox",{extend:"Ext.window.Window",requires:["Ext.toolbar.Toolbar","Ext.form.field.Text","Ext.form.field.TextArea","Ext.button.Button","Ext.layout.container.Anchor","Ext.layout.container.HBox","Ext.ProgressBar"],alias:"widget.messagebox",OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:Ext.baseCSSPrefix+"message-box-info",WARNING:Ext.baseCSSPrefix+"message-box-warning",QUESTION:Ext.baseCSSPrefix+"message-box-question",ERROR:Ext.baseCSSPrefix+"message-box-error",hideMode:"offsets",closeAction:"hide",resizable:false,title:"&#160;",width:600,height:500,minWidth:250,maxWidth:600,minHeight:110,maxHeight:500,constrain:true,cls:Ext.baseCSSPrefix+"message-box",layout:{type:"vbox",align:"stretch"},defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",yes:"Yes",no:"No",cancel:"Cancel"},buttonIds:["ok","yes","no","cancel"],titleText:{confirm:"Confirm",prompt:"Prompt",wait:"Loading...",alert:"Attention"},iconHeight:35,makeButton:function(a){var b=this.buttonIds[a];return new Ext.button.Button({handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var a=this;a.dd.endDrag();a.progressBar.reset();a.removeCls(a.cfg.cls);a.callParent()},initComponent:function(){var c=this,b,a;c.title="&#160;";c.topContainer=new Ext.container.Container({layout:"hbox",style:{padding:"10px",overflow:"hidden"},items:[c.iconComponent=new Ext.Component({cls:c.baseCls+"-icon",width:50,height:c.iconHeight}),c.promptContainer=new Ext.container.Container({flex:1,layout:{type:"anchor"},items:[c.msg=new Ext.Component({autoEl:{tag:"span"},cls:c.baseCls+"-text"}),c.textField=new Ext.form.field.Text({anchor:"100%",enableKeyEvents:true,listeners:{keydown:c.onPromptKey,scope:c}}),c.textArea=new Ext.form.field.TextArea({anchor:"100%",height:75})]})]});c.progressBar=new Ext.ProgressBar({margins:"0 10 0 10"});c.items=[c.topContainer,c.progressBar];c.msgButtons=[];for(b=0;b<4;b++){a=c.makeButton(b);c.msgButtons[a.itemId]=a;c.msgButtons.push(a)}c.bottomTb=new Ext.toolbar.Toolbar({ui:"footer",dock:"bottom",layout:{pack:"center"},items:[c.msgButtons[0],c.msgButtons[1],c.msgButtons[2],c.msgButtons[3]]});c.dockedItems=[c.bottomTb];c.callParent()},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(a){var d=this,c=0,g=true,e=d.maxWidth,b;d.updateButtonText();a=a||{};d.cfg=a;if(a.width){e=a.width}delete d.defaultFocus;d.animateTarget=a.animateTarget||undefined;d.modal=a.modal!==false;if(a.title){d.setTitle(a.title||"&#160;")}if(Ext.isObject(a.buttons)){d.buttonText=a.buttons;c=0}else{d.buttonText=a.buttonText||d.buttonText;c=Ext.isNumber(a.buttons)?a.buttons:0}c=c|d.updateButtonText();delete d.buttonText;Ext.suspendLayouts();d.hidden=false;if(!d.rendered){d.width=e;d.render(Ext.getBody())}else{d.setSize(e,d.maxHeight)}d.closable=a.closable&&!a.wait;d.header.child("[type=close]").setVisible(a.closable!==false);if(!a.title&&!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.update(a.msg);d.msg.show()}else{d.msg.hide()}if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b<4;b++){if(c&Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();g=false}else{d.msgButtons[b].hide()}}if(g){d.bottomTb.hide()}else{d.bottomTb.show()}Ext.resumeLayouts(true)},updateButtonText:function(){var c=this,d,a,b=0;for(d in c.buttonText){a=c.msgButtons[d];if(a){if(c.cfg&&c.cfg.buttonText){b=b|Math.pow(2,Ext.Array.indexOf(c.buttonIds,d))}if(a.text!=c.buttonText[d]){a.setText(c.buttonText[d])}}}return b},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);b.doAutoSize();b.hidden=true;b.callParent();return b},onShow:function(){this.callParent(arguments);this.center()},doAutoSize:function(){var c=this,d=c.header.rendered&&c.header.isVisible(),b,a;if(!Ext.isDefined(c.frameWidth)){c.frameWidth=c.el.getWidth()-c.body.getWidth()}c.minWidth=c.cfg.minWidth||Ext.getClass(this).prototype.minWidth;b=Math.max(d?c.header.getMinWidth():0,c.cfg.width||c.msg.getWidth()+c.iconComponent.getWidth()+25);a=(d?c.header.getHeight():0)+c.topContainer.getHeight()+c.progressBar.getHeight()+(c.bottomTb.rendered?c.bottomTb.getHeight()+c.bottomTb.el.getMargin("tb"):0);c.setSize(b+c.frameWidth,a+c.frameWidth);return c},updateText:function(a){this.msg.update(a);return this.doAutoSize(true)},setIcon:function(a){var b=this;b.iconComponent.removeCls(b.messageIconCls);if(a){b.iconComponent.show();b.iconComponent.addCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.addCls(b.messageIconCls=a)}else{b.iconComponent.removeCls(Ext.baseCSSPrefix+"dlg-icon");b.iconComponent.hide()}return b},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:this.QUESTION,msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,g,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:g,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define("Ext.form.Basic",{extend:"Ext.util.Observable",alternateClassName:"Ext.form.BasicForm",requires:["Ext.util.MixedCollection","Ext.form.action.Load","Ext.form.action.Submit","Ext.window.MessageBox","Ext.data.Errors","Ext.util.DelayedTask"],constructor:function(a,b){var e=this,g=e.onItemAddOrRemove,d,c;e.owner=a;e.mon(a,{add:g,remove:g,scope:e});Ext.apply(e,b);if(Ext.isString(e.paramOrder)){e.paramOrder=e.paramOrder.split(/[\s,|]/)}if(e.api){d=e.api=Ext.apply({},e.api);for(c in d){if(d.hasOwnProperty(c)){d[c]=Ext.direct.Manager.parseMethod(d[c])}}}e.checkValidityTask=new Ext.util.DelayedTask(e.checkValidity,e);e.addEvents("beforeaction","actionfailed","actioncomplete","validitychange","dirtychange");e.callParent()},initialize:function(){var a=this;a.initialized=true;a.onValidityChange(!a.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:"Please Wait...",trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,g){var d=this,e=!!g.ownerCt,b=g.isContainer;function a(h){d[e?"mon":"mun"](h,{validitychange:d.checkValidity,dirtychange:d.checkDirty,scope:d,buffer:100});delete d._fields}if(g.isFormField){a(g)}else{if(b){if(g.isDestroyed){delete d._fields}else{Ext.Array.forEach(g.query("[isFormField]"),a)}}}delete this._boundItems;if(d.initialized){d.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=new Ext.util.MixedCollection();a.addAll(this.owner.query("[isFormField]"))}return a},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=new Ext.util.MixedCollection();a.addAll(this.owner.query("[formBind]"))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;Ext.suspendLayouts();b=a.getFields().filterBy(function(c){return !c.validate()});Ext.resumeLayouts(true);return b.length<1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent("validitychange",b,a);b.wasValid=a}},onValidityChange:function(b){var a=this.getBoundItems();if(a){a.each(function(c){if(c.disabled===b){c.setDisabled(!b)}})}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent("dirtychange",this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias("formaction."+b,Ext.apply({},a,{form:this}))}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){return this.doAction(this.standardSubmit?"standardsubmit":this.api?"directsubmit":"submit",a)},load:function(a){return this.doAction(this.api?"directload":"load",a)},updateRecord:function(b){var a=b.fields,c=this.getFieldValues(),d,e={};a.each(function(g){d=g.name;if(d in c){e[d]=c[d]}});b.beginEdit();b.set(e);b.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(c){var a=c.waitMsg,b=Ext.baseCSSPrefix+"mask-loading",d;this.getFields().each(function(e){if(e.isFormField&&e.syncValue){e.syncValue()}});if(a){d=this.waitMsgTarget;if(d===true){this.owner.el.mask(a,b)}else{if(d){d=this.waitMsgTarget=Ext.get(d);d.mask(a,b)}else{Ext.MessageBox.wait(a,c.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.updateProgress(1);a.hide()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent("actioncomplete",this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent("actionfailed",this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(c){var a=this;function b(d,g){var e=a.findField(d);if(e){e.markInvalid(g)}}if(Ext.isArray(c)){Ext.each(c,function(d){b(d.id,d.msg)})}else{if(c instanceof Ext.data.Errors){c.each(function(d){b(d.field,d.message)})}else{Ext.iterate(c,b)}}return this},setValues:function(a){var b=this;function c(d,g){var e=b.findField(d);if(e){e.setValue(g);if(b.trackResetOnLoad){e.resetOriginalValue()}}}if(Ext.isArray(a)){Ext.each(a,function(d){c(d.id,d.value)})}else{Ext.iterate(a,c)}return this},getValues:function(e,b,d,a){var c={};this.getFields().each(function(h){if(!b||h.isDirty()){var g=h[a?"getModelData":"getSubmitData"](d);if(Ext.isObject(g)){Ext.iterate(g,function(j,k){if(d&&k===""){k=h.emptyText||""}if(j in c){var l=c[j],i=Ext.isArray;if(!i(l)){l=c[j]=[l]}if(i(k)){c[j]=l.concat(k)}else{l.push(k)}}else{c[j]=k}})}}});if(e){c=Ext.Object.toQueryString(c)}return c},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){var a=this;Ext.suspendLayouts();a.getFields().each(function(b){b.clearInvalid()});Ext.resumeLayouts(true);return a},reset:function(){var a=this;Ext.suspendLayouts();a.getFields().each(function(b){b.reset()});Ext.resumeLayouts(true);return a},applyToFields:function(a){this.getFields().each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.getFields().each(function(b){Ext.applyIf(b,a)});return this}});Ext.define("Ext.form.Panel",{extend:"Ext.panel.Panel",mixins:{fieldAncestor:"Ext.form.FieldAncestor"},alias:"widget.form",alternateClassName:["Ext.FormPanel","Ext.form.FormPanel"],requires:["Ext.form.Basic","Ext.util.TaskRunner"],layout:"anchor",ariaRole:"form",initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,["beforeaction","actionfailed","actioncomplete","validitychange","dirtychange"]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent()},afterFirstLayout:function(){this.callParent();this.form.initialize()},createForm:function(){return new Ext.form.Basic(this,Ext.applyIf({listeners:{}},this.initialConfig))},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(){return this.getForm().getValues()},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},startPolling:function(b){this.stopPolling();var a=new Ext.util.TaskRunner(b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){this.form.getFields().each(function(a){a.checkChange()})}});Ext.define("Ext.grid.RowEditor",{extend:"Ext.form.Panel",requires:["Ext.tip.ToolTip","Ext.util.HashMap","Ext.util.KeyNav"],saveBtnText:"Update",cancelBtnText:"Cancel",errorsText:"Errors",dirtyText:"You need to commit or cancel your changes",lastScrollLeft:0,lastScrollTop:0,border:false,hideMode:"offsets",initComponent:function(){var b=this,a;b.cls=Ext.baseCSSPrefix+"grid-row-editor";b.layout={type:"hbox",align:"middle"};b.columns=new Ext.util.HashMap();b.columns.getKey=function(d){var c;if(d.getEditor){c=d.getEditor();if(c){return c.id}}return d.id};b.mon(b.columns,{add:b.onFieldAdd,remove:b.onFieldRemove,replace:b.onFieldReplace,scope:b});b.callParent(arguments);if(b.fields){b.setField(b.fields);delete b.fields}b.hasFields=true;a=b.getForm();a.trackResetOnLoad=true},onFieldChange:function(){var c=this,b=c.getForm(),a=b.isValid();if(c.errorSummary&&c.isVisible()){c[a?"hideToolTip":"showToolTip"]()}if(c.floatingButtons){c.floatingButtons.child("#update").setDisabled(!a)}c.isValid=a},afterRender:function(){var b=this,a=b.editingPlugin;b.callParent(arguments);b.mon(b.renderTo,"scroll",b.onCtScroll,b,{buffer:100});b.mon(b.el,{click:Ext.emptyFn,stopPropagation:true});b.el.swallowEvent(["keypress","keydown"]);b.keyNav=new Ext.util.KeyNav(b.el,{enter:a.completeEdit,esc:a.onEscKey,scope:a});b.mon(a.view,{beforerefresh:b.onBeforeViewRefresh,refresh:b.onViewRefresh,scope:b})},onBeforeViewRefresh:function(b){var c=this,a=b.el.dom;if(c.el.dom.parentNode===a){a.removeChild(c.el.dom)}},onViewRefresh:function(c){var e=this,b=c.el.dom,d=e.context,a;b.appendChild(e.el.dom);if(d&&(a=d.store.indexOf(d.record))>=0){d.row=c.getNode(a);e.reposition();if(e.tooltip&&e.tooltip.isVisible()){e.tooltip.setTarget(d.row)}}else{e.editingPlugin.cancelEdit()}},onCtScroll:function(d,c){var a=this,b=c.scrollTop,g=c.scrollLeft;if(b!==a.lastScrollTop){a.lastScrollTop=b;if((a.tooltip&&a.tooltip.isVisible())||a.hiddenTip){a.repositionTip()}}if(g!==a.lastScrollLeft){a.lastScrollLeft=g;a.reposition()}},onColumnAdd:function(a){this.setField(a)},onColumnRemove:function(a){this.columns.remove(a)},onColumnResize:function(b,a){b.getEditor().setWidth(a-2);if(this.isVisible()){this.reposition()}},onColumnHide:function(a){a.getEditor().hide();if(this.isVisible()){this.reposition()}},onColumnShow:function(a){var b=a.getEditor();b.setWidth(a.getWidth()-2).show();if(this.isVisible()){this.reposition()}},onColumnMove:function(b,a,c){var d=b.getEditor();if(this.items.indexOf(d)!=c){this.move(a,c)}},onFieldAdd:function(e,a,b){var c=this,g=c.editingPlugin.grid.headerCt.getHeaderIndex(b),d=b.getEditor({xtype:"displayfield"});c.insert(g,d)},onFieldRemove:function(g,a,b){var c=this,e=b.getEditor(),d=e.el;c.remove(e,false);if(d){d.remove()}},onFieldReplace:function(e,a,c,b){var d=this;d.onFieldRemove(e,a,b)},clearFields:function(){var a=this,b=a.columns;b.each(function(c){b.removeAtKey(c)})},getFloatingButtons:function(){var d=this,e=Ext.baseCSSPrefix,c=e+"grid-row-editor-buttons",b=d.editingPlugin,a;if(!d.floatingButtons){a=d.floatingButtons=new Ext.Container({renderTpl:['<div class="{baseCls}-ml"></div>','<div class="{baseCls}-mr"></div>','<div class="{baseCls}-bl"></div>','<div class="{baseCls}-br"></div>','<div class="{baseCls}-bc"></div>',"{%this.renderContainer(out,values)%}"],width:200,renderTo:d.el,baseCls:c,layout:{type:"hbox",align:"middle"},defaults:{flex:1,margins:"0 1 0 1"},items:[{itemId:"update",xtype:"button",handler:b.completeEdit,scope:b,text:d.saveBtnText,disabled:!d.isValid,minWidth:Ext.panel.Panel.prototype.minButtonWidth},{xtype:"button",handler:b.cancelEdit,scope:b,text:d.cancelBtnText,minWidth:Ext.panel.Panel.prototype.minButtonWidth}]});d.mon(a.el,{mousedown:Ext.emptyFn,click:Ext.emptyFn,stopEvent:true})}return d.floatingButtons},reposition:function(r){var s=this,c=s.context,e=c&&Ext.get(c.row),p=s.getFloatingButtons(),q=p.el,a=s.editingPlugin.grid,g=a.view.el,o=a.headerCt.getFullWidth(),t=a.getWidth(),l=Math.min(o,t),n=a.view.el.dom.scrollLeft,i=p.getWidth(),d=(l-i)/2+n,j,h,m,k=function(){q.scrollIntoView(g,false);if(r&&r.callback){r.callback.call(r.scope||s)}};if(e&&Ext.isElement(e.dom)){e.scrollIntoView(g,false);j=e.getXY()[1]-5;h=e.getHeight();m=h+(s.editingPlugin.grid.rowLines?9:10);if(s.getHeight()!=m){s.setHeight(m);s.el.setLeft(0)}if(r){var b={to:{y:j},duration:r.duration||125,listeners:{afteranimate:function(){k();j=e.getXY()[1]-5}}};s.el.animate(b)}else{s.el.setY(j);k()}}if(s.getWidth()!=o){s.setWidth(o)}q.setLeft(d)},getEditor:function(a){var b=this;if(Ext.isNumber(a)){return b.query(">[isFormField]")[a]}else{if(a instanceof Ext.grid.column.Column){return a.getEditor()}}},removeField:function(b){var a=this;b=a.getEditor(b);a.mun(b,"validitychange",a.onValidityChange,a);a.columns.removeAtKey(b.id);Ext.destroy(b)},setField:function(a){var b=this,c;if(Ext.isArray(a)){Ext.Array.forEach(a,b.setField,b);return}c=a.getEditor(null,{xtype:"displayfield",getModelData:function(){return null}});c.margins="0 0 0 2";b.mon(c,"change",b.onFieldChange,b);if(b.isVisible()&&b.context){if(c.is("displayfield")){b.renderColumnData(c,b.context.record,a)}else{c.suspendEvents();c.setValue(b.context.record.get(a.dataIndex));c.resumeEvents()}}b.columns.add(c.id,a);if(a.hidden){b.onColumnHide(a)}else{if(b.hasFields){b.onColumnShow(a)}}},loadRecord:function(b){var d=this,c=d.getForm(),a=c.getFields();a.each(function(e){e.suspendEvents()});c.loadRecord(b);a.each(function(e){e.resumeEvents()});if(d.errorSummary){if(c.isValid()){d.hideToolTip()}else{d.showToolTip()}}Ext.Array.forEach(d.query(">displayfield"),function(e){d.renderColumnData(e,b)},d)},renderColumnData:function(m,i,c){var k=this,a=k.editingPlugin.grid,e=a.headerCt,l=a.view,o=l.store,g=c||k.columns.get(m.id),n=i.get(g.dataIndex),j=g.editRenderer||g.renderer,b,d,h;if(j){b={tdCls:"",style:""};d=o.indexOf(i);h=e.getHeaderIndex(g);n=j.call(g.scope||e.ownerCt,n,b,i,d,h,o,l)}m.setRawValue(n);m.resetOriginalValue()},beforeEdit:function(){var a=this;if(a.isVisible()&&a.errorSummary&&!a.autoCancel&&a.isDirty()){a.showToolTip();return false}},startEdit:function(b,h){var g=this,e=g.editingPlugin.grid,a=e.getView(),c=e.store,d=g.context=Ext.apply(g.editingPlugin.context,{view:e.getView(),store:c});d.grid.getSelectionModel().select(b);g.loadRecord(b);if(!g.isVisible()){g.show();g.focusContextCell()}else{g.reposition({callback:this.focusContextCell})}},focusContextCell:function(){var a=this.getEditor(this.context.colIdx);if(a&&a.focus){a.focus()}},cancelEdit:function(){var c=this,b=c.getForm(),a=b.getFields();c.hide();b.clearInvalid();a.each(function(d){d.suspendEvents()});b.reset();a.each(function(d){d.resumeEvents()})},completeEdit:function(){var b=this,a=b.getForm();if(!a.isValid()){return}a.updateRecord(b.context.record);b.hide();return true},onShow:function(){var a=this;a.callParent(arguments);a.reposition()},onHide:function(){var a=this;a.callParent(arguments);if(a.tooltip){a.hideToolTip()}if(a.context){a.context.view.focus();a.context=null}},isDirty:function(){var b=this,a=b.getForm();return a.isDirty()},getToolTip:function(){var a=this,b;if(!a.tooltip){b=a.tooltip=new Ext.tip.ToolTip({cls:Ext.baseCSSPrefix+"grid-row-editor-errors",title:a.errorsText,autoHide:false,closable:true,closeAction:"disable",anchor:"left"})}return a.tooltip},hideToolTip:function(){var a=this,b=a.getToolTip();if(b.rendered){b.disable()}a.hiddenTip=false},showToolTip:function(){var c=this,d=c.getToolTip(),a=c.context,e=Ext.get(a.row),b=a.grid.view.el;d.setTarget(e);d.showAt([-10000,-10000]);d.body.update(c.getErrors());d.mouseOffset=[b.getWidth()-e.getWidth()+c.lastScrollLeft+15,0];c.repositionTip();d.doLayout();d.enable()},repositionTip:function(){var i=this,j=i.getToolTip(),c=i.context,l=Ext.get(c.row),k=c.grid.view.el,e=k.getHeight(),g=i.lastScrollTop,h=g+e,b=l.getHeight(),a=l.dom.offsetTop,d=a+b;if(d>g&&a<h){j.show();i.hiddenTip=false}else{j.hide();i.hiddenTip=true}},getErrors:function(){var a=this,b=!a.autoCancel&&a.isDirty()?a.dirtyText+"<br />":"",c=[];Ext.Array.forEach(a.query(">[isFormField]"),function(d){c=c.concat(Ext.Array.map(d.getErrors(),function(g){return"<li>"+g+"</li>"}))},a);return b+"<ul>"+c.join("")+"</ul>"},beforeDestroy:function(){Ext.destroy(this.floatingButtons,this.tooltip);this.callParent()}});Ext.define("Ext.grid.plugin.RowEditing",{extend:"Ext.grid.plugin.Editing",alias:"plugin.rowediting",requires:["Ext.grid.RowEditor"],editStyle:"row",autoCancel:true,errorSummary:true,constructor:function(){var a=this;a.callParent(arguments);if(!a.clicksToMoveEditor){a.clicksToMoveEditor=a.clicksToEdit}a.autoCancel=!!a.autoCancel},init:function(a){this.callParent([a])},destroy:function(){var a=this;Ext.destroy(a.editor);a.callParent(arguments)},startEdit:function(a,d){var c=this,b=c.getEditor();if(c.callParent(arguments)===false){return false}if(b.beforeEdit()!==false){b.startEdit(c.context.record,c.context.column)}},cancelEdit:function(){var a=this;if(a.editing){a.getEditor().cancelEdit();a.callParent(arguments)}},completeEdit:function(){var a=this;if(a.editing&&a.validateEdit()){a.editing=false;a.fireEvent("edit",a,a.context)}},validateEdit:function(){var g=this,e=g.editor,d=g.context,a=d.record,c={},h={},b;e.items.each(function(i){b=i.name;c[b]=i.getValue();h[b]=a.get(b)});Ext.apply(d,{newValues:c,originalValues:h});return g.callParent(arguments)&&g.getEditor().completeEdit()},getEditor:function(){var a=this;if(!a.editor){a.editor=a.initEditor()}return a.editor},initEditor:function(){var d=this,c=d.grid,b=d.view,e=c.headerCt,a={autoCancel:d.autoCancel,errorSummary:d.errorSummary,fields:e.getGridColumns(),hidden:true,editingPlugin:d,renderTo:b.el};Ext.Array.forEach(["saveBtnText","cancelBtnText","errorsText","dirtyText"],function(g){if(Ext.isDefined(d[g])){a[g]=d[g]}});return Ext.create("Ext.grid.RowEditor",a)},initEditTriggers:function(){var c=this,b=c.grid,a=c.view,e=b.headerCt,d=c.clicksToMoveEditor===1?"click":"dblclick";c.callParent(arguments);if(c.clicksToMoveEditor!==c.clicksToEdit){c.mon(a,"cell"+d,c.moveEditorByClick,c)}},addHeaderEvents:function(){var a=this;a.callParent();a.mon(a.grid.headerCt,{scope:a,columnresize:a.onColumnResize,columnhide:a.onColumnHide,columnshow:a.onColumnShow,columnmove:a.onColumnMove})},startEditByClick:function(){var a=this;if(!a.editing||a.clicksToMoveEditor===a.clicksToEdit){a.callParent(arguments)}},moveEditorByClick:function(){var a=this;if(a.editing){a.superclass.startEditByClick.apply(a,arguments)}},onColumnAdd:function(a,c){if(c.isHeader){var d=this,b;d.initFieldAccessors(c);b=d.editor;if(b&&b.onColumnAdd){b.onColumnAdd(c)}}},onColumnRemove:function(a,c){if(c.isHeader){var d=this,b=d.getEditor();if(b&&b.onColumnRemove){b.onColumnRemove(c)}d.removeFieldAccessors(c)}},onColumnResize:function(a,d,c){if(d.isHeader){var e=this,b=e.getEditor();if(b&&b.onColumnResize){b.onColumnResize(d,c)}}},onColumnHide:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnHide){b.onColumnHide(c)}},onColumnShow:function(a,c){var d=this,b=d.getEditor();if(b&&b.onColumnShow){b.onColumnShow(c)}},onColumnMove:function(a,d,c,g){var e=this,b=e.getEditor();if(b&&b.onColumnMove){b.onColumnMove(d,c,g)}},setColumnField:function(b,d){var c=this,a=c.getEditor();a.removeField(b);c.callParent(arguments);c.getEditor().setField(b)}});Ext.define("Ext.FocusManager",{singleton:true,alternateClassName:["Ext.FocusMgr"],mixins:{observable:"Ext.util.Observable"},requires:["Ext.AbstractComponent","Ext.Component","Ext.ComponentManager","Ext.ComponentQuery","Ext.util.HashMap","Ext.util.KeyNav"],enabled:false,focusElementCls:Ext.baseCSSPrefix+"focus-element",focusFrameCls:Ext.baseCSSPrefix+"focus-frame",whitelist:["textfield"],constructor:function(){var a=this,b=Ext.ComponentQuery;a.addEvents("beforecomponentfocus","componentfocus","disable","enable");a.focusTask=new Ext.util.DelayedTask(a.handleComponentFocus,a);Ext.override(Ext.AbstractComponent,{onFocus:function(){this.callParent(arguments);if(a.enabled&&this.hasFocus){Array.prototype.unshift.call(arguments,this);a.onComponentFocus.apply(a,arguments)}},onBlur:function(){this.callParent(arguments);if(a.enabled&&!this.hasFocus){Array.prototype.unshift.call(arguments,this);a.onComponentBlur.apply(a,arguments)}},onDestroy:function(){this.callParent(arguments);if(a.enabled){Array.prototype.unshift.call(arguments,this);a.onComponentDestroy.apply(a,arguments)}}});Ext.override(Ext.Component,{afterHide:function(){this.callParent(arguments);if(a.enabled){Array.prototype.unshift.call(arguments,this);a.onComponentHide.apply(a,arguments)}}});a.keyNav=new Ext.util.KeyNav(Ext.getDoc(),{disabled:true,scope:a,backspace:a.focusLast,enter:a.navigateIn,esc:a.navigateOut,tab:a.navigateSiblings,space:a.navigateIn,del:a.focusLast,left:a.navigateSiblings,right:a.navigateSiblings,down:a.navigateSiblings,up:a.navigateSiblings});a.focusData={};a.subscribers=new Ext.util.HashMap();a.focusChain={};Ext.apply(b.pseudos,{focusable:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(j.isFocusable()){h.push(j)}}return h},nextFocus:function(g,e,j){j=j||1;e=parseInt(e,10);var d=g.length,h=e,k;for(;;){if((h+=j)>=d){h=0}else{if(h<0){h=d-1}}if(h===e){return[]}if((k=g[h]).isFocusable()){return[k]}}return[]},prevFocus:function(d,c){return this.nextFocus(d,c,-1)},root:function(e){var d=e.length,h=[],g=0,j;for(;g<d;g++){j=e[g];if(!j.ownerCt){h.push(j)}}return h}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;a.removeDOM();a.keyNav.disable();a.fireEvent("disable",a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}b.enabled=true;b.initDOM(a);b.keyNav.enable();b.focusEl.focus();delete b.focusedCmp;b.fireEvent("enable",b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var a=this,c=Ext.ComponentQuery,b=c.query(":focusable:root:not([floating])"),d=c.query(":focusable:root[floating]");d.sort(function(g,e){return g.el.getZIndex()>e.el.getZIndex()});return d.concat(b)},initDOM:function(c){var g=this,b=g.focusFrameCls,e=Ext.ComponentQuery.query("{getFocusEl()}:not([focusListenerAdded])"),d=0,a=e.length;if(!Ext.isReady){return Ext.onReady(g.initDOM,g)}for(;d<a;d++){e[d].addFocusListener()}if(!g.focusEl){g.focusEl=Ext.getBody();g.focusEl.dom.tabIndex=-1}if(!g.focusFrame&&c.focusFrame){g.focusFrame=Ext.getBody().createChild({cls:b,children:[{cls:b+"-top"},{cls:b+"-bottom"},{cls:b+"-left"},{cls:b+"-right"}],style:"top: -100px; left: -100px;"});g.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);g.focusFrameWidth=g.focusFrame.child("."+b+"-top").getHeight();g.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&&Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(g){var c=this,a=c.focusedCmp,b,d;if(!a){if(b=c.getRootComponents()[0]){if(b.getFocusEl()===c.focusEl){c.focusEl.blur()}b.focus()}}else{d=a.hasFocus?Ext.ComponentQuery.query(">:focusable",a)[0]:a;if(d){d.focus()}else{if(Ext.isFunction(a.onClick)){g.button=0;a.onClick(g);if(a.isVisible(true)){a.focus()}else{c.navigateOut()}}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(":focusable"))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(i,b,o){var j=this,a=b||j,p=i.getKey(),g=Ext.EventObject,k=i.shiftKey||p==g.LEFT||p==g.UP,c=p==g.LEFT||p==g.RIGHT||p==g.UP||p==g.DOWN,h=k?"prev":"next",n,d,m,l;m=(a.focusedCmp&&a.focusedCmp.comp)||a.focusedCmp;if(!m&&!o){return true}if(c&&j.isWhitelisted(m)){return true}if(!m||m.is(":root")){l=j.getRootComponents()}else{if(o=o||m.up()){l=o.getRefItems()}}if(l){n=m?Ext.Array.indexOf(l,m):-1;d=Ext.ComponentQuery.query(":"+h+"Focus("+n+")",l)[0];if(d&&m!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentFocus:function(d,g){var c=this,a=c.focusChain;if(!d.isFocusable()){c.clearComponent(d);if(a[d.id]){return}var b=d.up();if(b){a[d.id]=true;b.focus()}return}c.focusChain={};c.focusTask.delay(10,null,null,[d,d.getFocusEl()])},handleComponentFocus:function(m,i){var k=this;if(k.fireEvent("beforecomponentfocus",k,m,k.previousFocusedCmp)===false){k.clearComponent(m);return}k.focusedCmp=m;if(k.shouldShowFocusFrame(m)){var p="."+k.focusFrameCls+"-",a=k.focusFrame,d=k.focusFrameWidth,h=i.getPageBox(),o=h.top,b=h.left,l=h.width,e=h.height,g=a.child(p+"top"),c=a.child(p+"bottom"),n=a.child(p+"left"),j=a.child(p+"right");g.setWidth(l-2).setLeftTop(b+1,o);c.setWidth(l-2).setLeftTop(b+1,o+e-d);n.setHeight(e-2).setLeftTop(b,o+1);j.setHeight(e-2).setLeftTop(b+l-d,o+1);a.show()}k.fireEvent("componentfocus",k,m,k.previousFocusedCmp)},onComponentHide:function(e){var d=this,b=false,a=d.focusedCmp,c;if(a){b=e.hasFocus||(e.isContainer&&e.isAncestor(d.focusedCmp))}d.clearComponent(e);if(b&&(c=e.up(":focusable"))){c.focus()}else{d.focusEl.focus()}},onComponentDestroy:function(){},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusFrame);delete a.focusEl;delete a.focusFrame;delete a.focusFrameWidth},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setupSubscriberKeys:function(a,g){var e=this,d=a.getFocusEl(),c=g.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},h=function(i){if(e.focusedCmp===a){return e.navigateSiblings(i,e,a)}else{return e.navigateSiblings(i)}};Ext.iterate(g,function(j,i){b[j]=function(l){var k=h(l);if(Ext.isFunction(i)&&i.call(c||a,l,k)===true){return true}return k}},e);return new Ext.util.KeyNav(d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{},e=c.getFocusEl(),d=Ext.getDom(e).tagName;if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false}});Ext.define("Ext.menu.KeyNav",{extend:"Ext.util.KeyNav",requires:["Ext.FocusManager"],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.DOWN&&a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&&a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(g){var h=this.menu,b=h.items,d=h.focusedItem,c=d?b.indexOf(d):-1,a=c+g;while(a!=c){if(a<0){a=b.length-1}else{if(a>=b.length){a=0}}var e=b.getAt(a);if(h.canActivateItem(e)){h.setActiveItem(e);break}a+=g}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&&this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,g=d.focusedItem,a=d.activeItem,b;if(g&&this.isWhitelisted(g)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&&b.getKey()==Ext.EventObject.UP&&a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define("Ext.menu.Menu",{extend:"Ext.panel.Panel",alias:"widget.menu",requires:["Ext.layout.container.Fit","Ext.layout.container.VBox","Ext.menu.CheckItem","Ext.menu.Item","Ext.menu.KeyNav","Ext.menu.Manager","Ext.menu.Separator"],allowOtherMenus:false,ariaRole:"menu",defaultAlign:"tl-bl?",floating:true,constrain:true,hidden:true,hideMode:"visibility",ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+"menu"],c=b.bodyCls?[b.bodyCls]:[];b.addEvents("click","mouseenter","mouseleave","mouseover");Ext.menu.Manager.register(b);if(b.plain){a.push(d+"menu-plain")}b.cls=a.join(" ");c.unshift(d+"menu-body");b.bodyCls=c.join(" ");b.layout={type:"vbox",align:"stretchmax",autoSize:true,clearInnerCtOnLayout:true,overflowHandler:"Scroller"};if(b.floating===false&&b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on("beforeshow",function(){var e=!!b.items.length;if(e&&b.rendered){b.el.setStyle("visibility",null)}return e})},afterRender:function(a){var b=this,d=Ext.baseCSSPrefix,c="&#160;";b.callParent(arguments);if(b.showSeparator){b.iconSepEl=b.layout.getRenderTarget().insertFirst({cls:d+"menu-icon-separator",html:c})}b.mon(b.el,{click:b.onClick,mouseover:b.onMouseOver,scope:b});b.mouseMonitor=b.el.monitorMouseLeave(100,b.onMouseLeave,b);if(b.showSeparator&&((!Ext.isStrict&&Ext.isIE)||Ext.isIE6)){b.iconSepEl.setHeight(b.el.getHeight())}b.keyNav=new Ext.menu.KeyNav(b)},afterLayout:function(){var k=this;k.callParent(arguments);if((!Ext.isStrict&&Ext.isIE)||Ext.isIE6){var a=k.layout.getRenderTarget(),c=0,b=k.dockedItems,d=b.length,g=0,h,j,e;c=a.getWidth();e=c+k.body.getBorderWidth("lr")+k.body.getPadding("lr");k.body.setWidth(e);for(;g<d,h=b.getAt(g);g++){if(h.dock=="left"||h.dock=="right"){e+=h.getWidth()}}k.el.setWidth(e)}},getBubbleTarget:function(){return this.parentMenu||this.ownerButton||this.callParent(arguments)},canActivateItem:function(a){return a&&!a.isDisabled()&&a.isVisible()&&(a.canActivate||a.getXTypes().indexOf("menuitem")<0)},deactivateActiveItem:function(){var a=this;if(a.activeItem){a.activeItem.deactivate();if(!a.activeItem.activated){delete a.activeItem}}if(a.focusedItem&&!a.filtered){a.focusedItem.blur();if(!a.focusedItem.hasFocus){delete a.focusedItem}}},getFocusEl:function(){return this.el},hide:function(){this.deactivateActiveItem();this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(typeof b=="string"){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a;if(!c.isComponent){if(!c.xtype){c=Ext.create("Ext.menu."+(Ext.isBoolean(c.checked)?"Check":"")+"Item",c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&&!c.dock){a=[d+"menu-item",d+"menu-item-cmp"];if(!b.plain&&(c.indent===true||c.iconCls==="no-icon")){a.push(d+"menu-item-indent")}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:"")+" "+a.join(" ")}c.isMenuItem=true}return c},lookupItemFromString:function(a){return(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.Item({canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}if((c.getTarget()==b.el.dom)||c.within(b.layout.getRenderTarget())){a=b.getItemFromEvent(c)||b.activeItem;if(a){if(a.getXTypes().indexOf("menuitem")>=0){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}}b.fireEvent("click",b,a,c)}},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);delete a.parentMenu;delete a.ownerButton;if(a.rendered){a.el.un(a.mouseMonitor);a.keyNav.destroy();delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent("mouseleave",a,b)},onMouseOver:function(h){var g=this,i=h.getRelatedTarget(),b=!g.el.contains(i),d=g.getItemFromEvent(h),c=g.parentMenu,a=g.parentItem;if(b&&c){c.setActiveItem(a);a.cancelDeferHide();c.mouseMonitor.mouseenter()}if(g.disabled){return}if(d){g.setActiveItem(d);if(d.activated&&d.expandMenu){d.expandMenu()}}if(b){g.fireEvent("mouseenter",g,h)}g.fireEvent("mouseover",g,d,h)},setActiveItem:function(b){var a=this;if(b&&(b!=a.activeItem&&b!=a.focusedItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,d,c){var a=this;if(a.floating&&b){a.layout.autoSize=true;if(!a.el){a.hidden=false;a.doAutoRender();a.el.hide();a.hidden=true}a.setPagePosition(a.el.getAlignToXY(b.el||b,d||a.defaultAlign,c));a.show()}return a},doConstrain:function(){var g=this,h=g.el.getY(),i,e,b,j=h,k,d,a,c;delete g.height;g.updateLayout();e=g.getHeight();if(g.floating){d=Ext.fly(g.el.getScopeParent());a=d.getScroll().top;c=d.getViewSize().height;k=h-a;i=g.maxHeight?g.maxHeight:c-k;if(e>c){i=c;j=h-k}else{if(i<e){j=h-(e-i);i=e}}}else{i=g.getHeight()}if(g.maxHeight){i=Math.min(g.maxHeight,i)}if(e>i&&i>0){g.layout.autoSize=false;g.setHeight(i);if(g.showSeparator){g.iconSepEl.setHeight(g.layout.getRenderTarget().dom.scrollHeight)}}b=g.getConstrainVector(g.el.getScopeParent());if(b){g.setPosition(g.getPosition()[0]+b[0])}g.el.setY(j)}});Ext.define("Ext.menu.ColorPicker",{extend:"Ext.menu.Menu",alias:"widget.colormenu",requires:["Ext.picker.Color"],hideOnClick:true,pickerId:null,initComponent:function(){var b=this,a=Ext.apply({},b.initialConfig);delete a.listeners;Ext.apply(b,{plain:true,showSeparator:false,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-color-item",id:b.pickerId,xtype:"colorpicker"},a)});b.callParent(arguments);b.picker=b.down("colorpicker");b.relayEvents(b.picker,["select"]);if(b.hideOnClick){b.on("select",b.hidePickerOnSelect,b)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});Ext.define("Ext.menu.DatePicker",{extend:"Ext.menu.Menu",alias:"widget.datemenu",requires:["Ext.picker.Date"],hideOnClick:true,pickerId:null,initComponent:function(){var a=this;Ext.apply(a,{showSeparator:false,plain:true,border:false,bodyPadding:0,items:Ext.applyIf({cls:Ext.baseCSSPrefix+"menu-date-item",id:a.pickerId,xtype:"datepicker"},a.initialConfig)});a.callParent(arguments);a.picker=a.down("datepicker");a.relayEvents(a.picker,["select"]);if(a.hideOnClick){a.on("select",a.hidePickerOnSelect,a)}},hidePickerOnSelect:function(){Ext.menu.Manager.hideAll()}});
